diff options
author | Matt Harding <majaharding@gmail.com> | 2023-10-05 17:17:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 09:17:45 -0700 |
commit | bd7ca98b66700925625ae84aa1083e94a3b875aa (patch) | |
tree | 0ec45800a8a69b4dccdd2be1094fc219adb7414d /llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp | |
parent | 6b31b026006ee688019e7cf762ab1641df8ff8f6 (diff) | |
download | llvm-bd7ca98b66700925625ae84aa1083e94a3b875aa.zip llvm-bd7ca98b66700925625ae84aa1083e94a3b875aa.tar.gz llvm-bd7ca98b66700925625ae84aa1083e94a3b875aa.tar.bz2 |
Ensure NoTrapAfterNoreturn is false for the wasm backend (#65876)
In the WebAssembly back end, the TrapUnreachable option is currently
load-bearing for correctness, inserting wasm `unreachable` instructions
where needed to create valid wasm. There is another option,
NoTrapAfterNoreturn, that removes some of those traps and causes
incorrect wasm to be emitted.
This turns off `NoTrapAfterNoreturn` for the Wasm backend and adds new
tests.
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp index 131e99c..d8cbddf 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp @@ -667,7 +667,7 @@ void WebAssemblyCFGStackify::removeUnnecessaryInstrs(MachineFunction &MF) { // When there is an unconditional branch right before a catch instruction and // it branches to the end of end_try marker, we don't need the branch, because - // it there is no exception, the control flow transfers to that point anyway. + // if there is no exception, the control flow transfers to that point anyway. // bb0: // try // ... |