[Mlir-commits] [clang] [llvm] [mlir] Delegate __builtin_setjmp FP save to backend on windows CFI targets (PR #186843)

Pyry Kovanen llvmlistbot at llvm.org
Wed Mar 18 06:30:13 PDT 2026


pkova wrote:

Fair enough.

I realize that this is not what you asked for but I decided to rip out the bandaid and make all targets that support `__builtin_setjmp` use a new `@llvm.setjmp` intrinsic. This involved a lot of cargo culting based on what the old `@llvm.eh.sjlj.setjmp`, `@llvm.frameaddress` and `@llvm.stacksave` were doing. I also added `setjmp.ll` tests for all targets for checking that the old pattern and the new pattern produce the same stores into the jump buffer.

I see you were worried about backwards compatibility concerns in the discussion you linked. If we were to change `@llvm.eh.sjlj.setjmp` instead do we care that other frontends (or older clang) might emit redundant fp and sp stores? Does bitcode compatibility come into play here at all?

This certainly increases the blast radius of this PR if nothing else!

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


More information about the Mlir-commits mailing list