[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 14 12:19:28 PDT 2025


================
@@ -37,9 +37,11 @@ cond.end:                                         ; preds = %entry, %cond.true
 ; CHECK: testq
 ; CHECK: je
 ; CHECK: callq alloc
+; CHECK-NEXT: nop
----------------
sivadeilra wrote:

>From my testing, MSVC actually does insert a NOP before the SEH epilogue.  The tricky part is convincing MSVC to avoid tail-call optimization.  Compiling with optimizations disabled, I see a CALL / NOP / epilogue sequence in this code, compiled as C with exceptions disabled.  Same results with /EHa.

```
void foo(int);
void bar() {
  foo(42);
}
```

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


More information about the llvm-commits mailing list