[clang] [llvm] Delegate __builtin_setjmp FP save to backend on windows CFI targets (PR #186843)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 26 16:09:52 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 171831 tests passed
* 3079 tests skipped
* 5 tests failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.CodeGen/Thumb2/setjmp_longjmp.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/Thumb2/setjmp_longjmp.ll -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/Thumb2/setjmp_longjmp.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/Thumb2/setjmp_longjmp.ll -o -
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/Thumb2/setjmp_longjmp.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/Thumb2/setjmp_longjmp.ll:21:15: error: CHECK-NEXT: is not on the line after the previous match
# | ; CHECK-NEXT: mov r1, pc @ eh_setjmp begin
# | ^
# | <stdin>:18:2: note: 'next' match was here
# | mov r1, pc @ eh_setjmp begin
# | ^
# | <stdin>:15:21: note: previous match ended here
# | str.w sp, [sp, #12]
# | ^
# | <stdin>:16:1: note: non-matching line after previous match is here
# | str.w sp, [sp, #4]
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/Thumb2/setjmp_longjmp.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 13: add r0, sp, #4
# | 14: str r7, [sp, #4]
# | 15: str.w sp, [sp, #12]
# | 16: str.w sp, [sp, #4]
# | 17: str.w sp, [sp, #12]
# | 18: mov r1, pc @ eh_setjmp begin
# | next:21 !~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: match on wrong line
# | 19: adds r1, r1, #7
# | 20: str r1, [r0, #4]
# | 21: movs r0, #0
# | 22: b LSJLJEH0
# | 23: movs r0, #1 @ eh_setjmp end
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.CodeGen/VE/Scalar/builtin_sjlj.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/VE/Scalar/builtin_sjlj.ll -mtriple=ve | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/VE/Scalar/builtin_sjlj.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=ve
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/VE/Scalar/builtin_sjlj.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/VE/Scalar/builtin_sjlj.ll:37:15: error: CHECK-NEXT: is not on the line after the previous match
# | ; CHECK-NEXT: st %s1, 8(, %s0)
# | ^
# | <stdin>:49:2: note: 'next' match was here
# | st %s1, 8(, %s0)
# | ^
# | <stdin>:46:31: note: previous match ended here
# | lea.sl %s1, .LBB0_3 at hi(, %s1)
# | ^
# | <stdin>:47:1: note: non-matching line after previous match is here
# | st %s9, (, %s0)
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/VE/Scalar/builtin_sjlj.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 44: lea %s1, .LBB0_3 at lo
# | 45: and %s1, %s1, (32)0
# | 46: lea.sl %s1, .LBB0_3 at hi(, %s1)
# | 47: st %s9, (, %s0)
# | 48: st %s11, 16(, %s0)
# | 49: st %s1, 8(, %s0)
# | next:37 !~~~~~~~~~~~~~~~ error: match on wrong line
# | 50: # EH_SJlJ_SETUP .LBB0_3
# | 51: # %bb.1:
# | 52: lea %s0, 0
# | 53: br.l.t .LBB0_2
# | 54: .LBB0_3: # Block address taken
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.CodeGen/VE/Scalar/builtin_sjlj_bp.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/VE/Scalar/builtin_sjlj_bp.ll -mtriple=ve | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/VE/Scalar/builtin_sjlj_bp.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=ve
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/VE/Scalar/builtin_sjlj_bp.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/VE/Scalar/builtin_sjlj_bp.ll:40:15: error: CHECK-NEXT: is not on the line after the previous match
# | ; CHECK-NEXT: st %s17, 24(, %s1)
# | ^
# | <stdin>:57:2: note: 'next' match was here
# | st %s17, 24(, %s1)
# | ^
# | <stdin>:54:31: note: previous match ended here
# | lea.sl %s0, .LBB0_3 at hi(, %s0)
# | ^
# | <stdin>:55:1: note: non-matching line after previous match is here
# | st %s9, (, %s1)
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/VE/Scalar/builtin_sjlj_bp.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 52: lea %s0, .LBB0_3 at lo
# | 53: and %s0, %s0, (32)0
# | 54: lea.sl %s0, .LBB0_3 at hi(, %s0)
# | 55: st %s9, (, %s1)
# | 56: st %s11, 16(, %s1)
# | 57: st %s17, 24(, %s1)
# | next:40 !~~~~~~~~~~~~~~~~~ error: match on wrong line
# | 58: st %s1, 296(, %s17) # 8-byte Folded Spill
# | 59: st %s0, 8(, %s1)
# | 60: # EH_SJlJ_SETUP .LBB0_3
# | 61: # %bb.1:
# | 62: lea %s5, 0
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.CodeGen/X86/i386-setjmp-pic.ll</summary>
```
Exit Code: 2
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -verify-machineinstrs -relocation-model=pic /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/i386-setjmp-pic.ll -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/i386-setjmp-pic.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -verify-machineinstrs -relocation-model=pic /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/i386-setjmp-pic.ll -o -
# .---command stderr------------
# |
# | # After Instruction Selection
# | # Machine code for function test: IsSSA, TracksLiveness
# | Frame Objects:
# | fi#-1: size=4, align=16, fixed, at location [SP+4]
# | save/restore points:
# | save points are empty
# | restore points are empty
# |
# | bb.0.entry:
# | successors: %bb.1(0x40000000), %bb.3(0x40000000); %bb.1(50.00%), %bb.3(50.00%)
# |
# | %0:gr32_nosp = MOVPC32r 0, implicit $esp, implicit $ssp
# | %1:gr32 = MOV32rm %fixed-stack.0, 1, $noreg, 0, $noreg :: (load (s32) from %fixed-stack.0, align 16)
# | %5:gr32 = LEA32r %0:gr32_nosp, 0, $noreg, target-flags(x86-pic-base-offset) %bb.3, $noreg
# | MOV32mr killed %1:gr32, 1, $noreg, 4, $noreg, %5:gr32
# | MOV32mr killed %1:gr32, 1, $noreg, 8, $noreg, $esp
# | EH_SjLj_Setup %bb.3, <regmask>
# |
# | bb.1.entry:
# | ; predecessors: %bb.0
# | successors: %bb.2(0x80000000); %bb.2(100.00%)
# |
# | %3:gr32 = MOV32r0 implicit-def $eflags
# |
# | bb.2.entry:
# | ; predecessors: %bb.1, %bb.3
# |
# | %2:gr32 = PHI %3:gr32, %bb.1, %4:gr32, %bb.3
# | $eax = COPY %2:gr32
# | RET 0, $eax
# |
# | bb.3.entry (machine-block-address-taken):
# | ; predecessors: %bb.0
# | successors: %bb.2(0x80000000); %bb.2(100.00%)
# |
# | %4:gr32 = MOV32ri 1
# | JMP_1 %bb.2
# |
# | # End machine code for function test.
# |
# | *** Bad machine code: Using a killed virtual register ***
# | - function: test
# | - basic block: %bb.0 entry (0x2cdf7318)
# | - instruction: MOV32mr killed %1:gr32, 1, $noreg, 8, $noreg, $esp
# | - operand 0: killed %1:gr32
# | LLVM ERROR: Found 1 machine code errors.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
# | Stack dump:
# | 0. Program arguments: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -verify-machineinstrs -relocation-model=pic /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/i386-setjmp-pic.ll -o -
# | 1. Running pass 'Function Pass Manager' on module '/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/i386-setjmp-pic.ll'.
# | 2. Running pass 'Verify generated machine code' on function '@test'
# | #0 0x00000000085ad818 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:880:13
# | #1 0x00000000085aa781 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:109:18
# | #2 0x00000000085ae631 SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:448:38
# | #3 0x00007cd8a869e330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# | #4 0x00007cd8a86f7b2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
# | #5 0x00007cd8a869e27e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
# | #6 0x00007cd8a86818ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
# | #7 0x000000000850a335 llvm::report_fatal_error(llvm::Twine const&, bool) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/ErrorHandling.cpp:137:5
# | #8 0x000000000738779b (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc+0x738779b)
# | #9 0x000000000738874f (anonymous namespace)::MachineVerifierLegacyPass::runOnMachineFunction(llvm::MachineFunction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/MachineVerifier.cpp:0:5
# | #10 0x00000000072650e3 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:0:10
# | #11 0x00000000077d6c58 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:0:27
# | #12 0x00000000077de702 llvm::FPPassManager::runOnModule(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1444:13
# | #13 0x00000000077d76cb runOnModule /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1513:27
# | #14 0x00000000077d76cb llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:531:44
# | #15 0x0000000004f970ab compileModule(char**, llvm::SmallVectorImpl<llvm::PassPlugin>&, llvm::LLVMContext&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llc/llc.cpp:874:17
# | #16 0x0000000004f94083 main /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llc/llc.cpp:460:13
# | #17 0x00007cd8a86831ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
# | #18 0x00007cd8a868328b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
# | #19 0x0000000004f8fba5 _start (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc+0x4f8fba5)
# `-----------------------------
# error: command failed with exit status: -6
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/i386-setjmp-pic.ll
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/i386-setjmp-pic.ll
# `-----------------------------
# error: command failed with exit status: 2
--
```
</details>
<details>
<summary>LLVM.CodeGen/X86/shadow-stack.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple x86_64-apple-macosx10.13.0 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/shadow-stack.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/shadow-stack.ll --check-prefix=X86_64
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple x86_64-apple-macosx10.13.0
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/shadow-stack.ll --check-prefix=X86_64
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/shadow-stack.ll:138:16: error: X86_64-NEXT: is not on the line after the previous match
# | ; X86_64-NEXT: xorq %rcx, %rcx
# | ^
# | <stdin>:73:2: note: 'next' match was here
# | xorq %rcx, %rcx
# | ^
# | <stdin>:70:20: note: previous match ended here
# | movq %rcx, 8(%rax)
# | ^
# | <stdin>:71:1: note: non-matching line after previous match is here
# | movq %rbp, (%rax)
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/shadow-stack.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 68: movq %rsp, 16(%rax)
# | 69: leaq LBB1_4(%rip), %rcx
# | 70: movq %rcx, 8(%rax)
# | 71: movq %rbp, (%rax)
# | 72: movq %rsp, 16(%rax)
# | 73: xorq %rcx, %rcx
# | next:138 !~~~~~~~~~~~~~~ error: match on wrong line
# | 74: rdsspq %rcx
# | 75: movq %rcx, 24(%rax)
# | 76: #EH_SjLj_Setup LBB1_4
# | 77: ## %bb.1: ## %entry
# | 78: xorl %eax, %eax
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/186843
More information about the cfe-commits
mailing list