Skip to content

Backport #187484#194

Closed
hoodmane wants to merge 1 commit intorust-lang:rustc/22.1-2026-01-27from
hoodmane:merge-release/22.x-into-rustc/22.1-2026-01-27
Closed

Backport #187484#194
hoodmane wants to merge 1 commit intorust-lang:rustc/22.1-2026-01-27from
hoodmane:merge-release/22.x-into-rustc/22.1-2026-01-27

Conversation

@hoodmane
Copy link
Copy Markdown

@hoodmane hoodmane commented Apr 13, 2026

Cherry-picks llvm#187484 from the llvm 22.x branch

cc @apiraino @wesleywiser would appreciate if you can tell me if I'm doing this right.

@hoodmane hoodmane changed the title Merge release/22.x to bring in wasm codegen fix #187484 Apr 13, 2026
@hoodmane hoodmane changed the title #187484 Backport #187484 Apr 13, 2026
…indMismatches()`

 `fixCallUnwindMismatches()` adds an extra try block around call sites with
incorrect unwind targets. `fixCatchUnwindMismatches()` handles catch blocks
that have incorrect next unwind destinations. Previously we ran
`fixCallUnwindMismatches()` first and then ran `fixCatchUnwindMismatches()`. The
problem is that `fixCatchUnwindMismatches()` wraps entire try blocks which can
change the unwind destination of the calls inside. If the calls had an incorrect
unwind target to begin with, they will be wrapped already and so the outer
wrapping can't alter their unwind target. However, if they have a correct unwind
target, they won't get wrapped and then that can be messed up by
`fixCatchUnwindMismatches()`.

The fix is to run `fixCatchUnwindMismatches()` first.
`fixCallUnwindMismatches()` never messes up the result of
`fixCatchUnwindMismatches()` so this is the correct order.

Resolves llvm#187302
@hoodmane hoodmane force-pushed the merge-release/22.x-into-rustc/22.1-2026-01-27 branch from 1aec7aa to 815c016 Compare April 13, 2026 15:37
@cuviper
Copy link
Copy Markdown
Member

cuviper commented Apr 13, 2026

This was already backported to LLVM's release/22.x branch, so we should get it when we update to the next point release, rather than cherry-picking it ourselves separately.

@hoodmane
Copy link
Copy Markdown
Author

Should I wait on the Rust PR until we bring this in organically then?

@hoodmane
Copy link
Copy Markdown
Author

Opened rust-lang/rust#155249 for reference.

@cuviper
Copy link
Copy Markdown
Member

cuviper commented Apr 13, 2026

Should I wait on the Rust PR until we bring this in organically then?

That would be my preference, especially since we're near the beginning of a new release cycle anyway, so there's plenty of time to get that in.

@hoodmane
Copy link
Copy Markdown
Author

Okay I'll just close this.

@hoodmane hoodmane closed this Apr 13, 2026
@hoodmane hoodmane deleted the merge-release/22.x-into-rustc/22.1-2026-01-27 branch April 13, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants