[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: Windows-->
# :window: Windows x64 Test Results
* 132769 tests passed
* 3033 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
c:\_work\llvm-project\llvm-project\build\bin\llc.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\Thumb2\setjmp_longjmp.ll -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\Thumb2\setjmp_longjmp.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\Thumb2\setjmp_longjmp.ll' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\Thumb2\setjmp_longjmp.ll'
# .---command stderr------------
# | C:\_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: C:\_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
c:\_work\llvm-project\llvm-project\build\bin\llc.exe < C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\VE\Scalar\builtin_sjlj.ll -mtriple=ve | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\VE\Scalar\builtin_sjlj.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=ve
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\VE\Scalar\builtin_sjlj.ll'
# .---command stderr------------
# | C:\_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: C:\_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
c:\_work\llvm-project\llvm-project\build\bin\llc.exe < C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\VE\Scalar\builtin_sjlj_bp.ll -mtriple=ve | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\VE\Scalar\builtin_sjlj_bp.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=ve
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\VE\Scalar\builtin_sjlj_bp.ll'
# .---command stderr------------
# | C:\_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: C:\_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
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -verify-machineinstrs -relocation-model=pic C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\i386-setjmp-pic.ll -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\i386-setjmp-pic.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -verify-machineinstrs -relocation-model=pic 'C:\_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 (0x1df3e69aed8)
# | - 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: c:\\_work\\llvm-project\\llvm-project\\build\\bin\\llc.exe -verify-machineinstrs -relocation-model=pic C:\\_work\\llvm-project\\llvm-project\\llvm\\test\\CodeGen\\X86\\i386-setjmp-pic.ll -o -
# | 1. Running pass 'Function Pass Manager' on module 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\i386-setjmp-pic.ll'.
# | 2. Running pass 'Verify generated machine code' on function '@test'
# | Exception Code: 0xC000001D
# | #0 0x00007ff6717230d6 (c:\_work\llvm-project\llvm-project\build\bin\llc.exe+0x2d330d6)
# | #1 0x00007ffc1cb9bb04 (C:\Windows\System32\ucrtbase.dll+0x7bb04)
# | #2 0x00007ffc1cb9cad1 (C:\Windows\System32\ucrtbase.dll+0x7cad1)
# | #3 0x00007ff66f0ed40a (c:\_work\llvm-project\llvm-project\build\bin\llc.exe+0x6fd40a)
# | #4 0x00007ff66ee8d881 (c:\_work\llvm-project\llvm-project\build\bin\llc.exe+0x49d881)
# | #5 0x00007ff66ee8ec9a (c:\_work\llvm-project\llvm-project\build\bin\llc.exe+0x49ec9a)
# | #6 0x00007ff66f445da3 (c:\_work\llvm-project\llvm-project\build\bin\llc.exe+0xa55da3)
# | #7 0x00007ff66eeaf979 (c:\_work\llvm-project\llvm-project\build\bin\llc.exe+0x4bf979)
# | #8 0x00007ff66eeb840d (c:\_work\llvm-project\llvm-project\build\bin\llc.exe+0x4c840d)
# | #9 0x00007ff66eeb05f8 (c:\_work\llvm-project\llvm-project\build\bin\llc.exe+0x4c05f8)
# | #10 0x00007ff66e9f73e2 (c:\_work\llvm-project\llvm-project\build\bin\llc.exe+0x73e2)
# | #11 0x00007ff673229d60 (c:\_work\llvm-project\llvm-project\build\bin\llc.exe+0x4839d60)
# | #12 0x00007ffc22ee4cb0 (C:\Windows\System32\KERNEL32.DLL+0x14cb0)
# | #13 0x00007ffc2f0fedcb (C:\Windows\SYSTEM32\ntdll.dll+0x7edcb)
# `-----------------------------
# error: command failed with exit status: 0xc000001d
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\i386-setjmp-pic.ll'
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line: c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_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
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -mtriple x86_64-apple-macosx10.13.0 < C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\shadow-stack.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\shadow-stack.ll --check-prefix=X86_64
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple x86_64-apple-macosx10.13.0
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\shadow-stack.ll' --check-prefix=X86_64
# .---command stderr------------
# | C:\_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: C:\_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