[llvm] Ensure NoTrapAfterNoreturn is false for the wasm backend (PR #65876)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 15:14:53 PDT 2023


================
@@ -159,6 +207,9 @@ bool WebAssemblyPeephole::runOnMachineFunction(MachineFunction &MF) {
       case WebAssembly::RETURN:
         Changed |= maybeRewriteToFallthrough(MI, MBB, MF, MFI, MRI, TII);
         break;
+      case WebAssembly::UNREACHABLE:
+        Changed |= eraseDeadCodeAroundUnreachable(MI, MBB);
----------------
sbc100 wrote:

Maybe this dead code removal change seems substantial enough as to warrant landing (and testing) separately?

https://github.com/llvm/llvm-project/pull/65876


More information about the llvm-commits mailing list