[PATCH] D96595: [WebAssemblly] Fix rethrow's argument computation
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 12 05:47:17 PST 2021
aheejin added a comment.
This replaces D96532 <https://reviews.llvm.org/D96532>. D96532 <https://reviews.llvm.org/D96532> didn't correctly handle this case:
try
...
catch
try
rethrow 1 ;; (1)
catch
rethrow 0 ;; (2)
end
end
D96532 <https://reviews.llvm.org/D96532> correctly computed the argument for (2) but not (1). Because (1) rethrows the exception caught by the outer `catch`, its argument shouldn't be 0, but D96532 <https://reviews.llvm.org/D96532> computed it as 0. This CL correctly handles this case.
================
Comment at: llvm/test/CodeGen/WebAssembly/exception.mir:49
EH_LABEL <mcsymbol .Ltmp2>
- CATCHRET %bb.2, %bb.0, implicit-def dead $arguments
+ CATCHRET %bb.2, %bb.1, implicit-def dead $arguments
----------------
These are just drive-by changes and not related to `rethrow`. (`CATCHRET`'s second argument should be the landingpad BB but this was incorrect before, but because we don't really use the second argument this didn't matter.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96595/new/
https://reviews.llvm.org/D96595
More information about the llvm-commits
mailing list