Skip to content

Poor codegen for typed throws #83470

@rauhul

Description

@rauhul

Description

I implemented an AudioQueueOutputCallback in Swift and observed pretty poor codegen in release mode.

Reproduction

See attached package and compare the C and Swift symbols:

  • xx_next_audio_queue_buffer
  • xxNextAudioQueueBuffer

optimizer.zip

Expected behavior

Swift should produce nearly (if not actually) identical code for the callback impl

Environment

➜  optimizer 􀫊 :(main 7/28/25) swiftc --version
Apple Swift version 6.2-dev (LLVM 61d7c1adb328ec1, Swift 8803d8359c2cffb)
Target: arm64-apple-macosx26.0
Build config: +assertions

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.performancetriage neededThis issue needs more specific labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions