[llvm] [WebAssembly] Add unreachable before catch destinations (PR #123915)
Derek Schuff via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 22 15:48:56 PST 2025
================
@@ -1943,8 +1951,16 @@ bool WebAssemblyCFGStackify::fixCallUnwindMismatches(MachineFunction &MF) {
// When end_loop is before end_try_table within the same BB in unwind
// destinations, we should split the end_loop into another BB.
if (!WebAssembly::WasmUseLegacyEH)
- for (auto &[UnwindDest, _] : UnwindDestToTryRanges)
- splitEndLoopBB(UnwindDest);
+ for (auto &[UnwindDest, _] : UnwindDestToTryRanges) {
+ auto It = EHPadToTry.find(UnwindDest);
+ // If UnwindDest is the faker caller block, it will not be in EHPadToTry
----------------
dschuff wrote:
```suggestion
// If UnwindDest is the fake caller block, it will not be in EHPadToTry
```
https://github.com/llvm/llvm-project/pull/123915
More information about the llvm-commits
mailing list