[llvm] 4dd595b - Wasm: Remove incorrect assumption that intrinsics cannot throw (#221180)

via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 13 02:48:06 PDT 2026


Author: Matt Arsenault
Date: 2026-09-13T11:48:01+02:00
New Revision: 4dd595b99e4e0a9c7994726065ab99d6c2b071c2

URL: https://github.com/llvm/llvm-project/commit/4dd595b99e4e0a9c7994726065ab99d6c2b071c2
DIFF: https://github.com/llvm/llvm-project/commit/4dd595b99e4e0a9c7994726065ab99d6c2b071c2.diff

LOG: Wasm: Remove incorrect assumption that intrinsics cannot throw (#221180)

A few intrinsics are marked as Throws

Added: 
    

Modified: 
    llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
index cd1ce993a16ed..c21d6386ea15d 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
@@ -402,9 +402,6 @@ ModulePass *llvm::createWebAssemblyLowerEmscriptenEHSjLjLegacyPass() {
 
 static bool canThrow(const Value *V) {
   if (const auto *F = dyn_cast<const Function>(V)) {
-    // Intrinsics cannot throw
-    if (F->isIntrinsic())
-      return false;
     StringRef Name = F->getName();
     // leave setjmp and longjmp (mostly) alone, we process them properly later
     if (Name == "setjmp" || Name == "longjmp" || Name == "emscripten_longjmp")


        


More information about the llvm-commits mailing list