[llvm] [CFIInstrInserter] Only track callee-saved registers. (PR #177210)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 21 10:36:56 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 130058 tests passed
* 2876 tests skipped
* 2 tests failed

## Failed Tests
(click on a test name to see its output)

### LLVM
<details>
<summary>LLVM.CodeGen/X86/cfi-inserter-callee-save-register-2.mir</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -o - C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\cfi-inserter-callee-save-register-2.mir -mtriple=x86_64-- -verify-cfiinstrs      -run-pass=cfi-instr-inserter 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\cfi-inserter-callee-save-register-2.mir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -o - 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\cfi-inserter-callee-save-register-2.mir' -mtriple=x86_64-- -verify-cfiinstrs -run-pass=cfi-instr-inserter
# 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\cfi-inserter-callee-save-register-2.mir'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\cfi-inserter-callee-save-register-2.mir:13:15: error: CHECK-NEXT: expected string not found in input
# | # CHECK-NEXT: CFI_INSTRUCTION offset $r12, -24
# |               ^
# | <stdin>:130:34: note: scanning from here
# |  CFI_INSTRUCTION offset $rbp, -16
# |                                  ^
# | <stdin>:146:2: note: possible intended match here
# |  CFI_INSTRUCTION def_cfa $rsp, 8
# |  ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\cfi-inserter-callee-save-register-2.mir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |          125:   
# |          126:  CFI_INSTRUCTION def_cfa $rbp, 16 
# |          127:  CFI_INSTRUCTION offset $r12, -24 
# |          128:  CFI_INSTRUCTION register $r13, $rcx 
# |          129:  CFI_INSTRUCTION offset $r14, -40 
# |          130:  CFI_INSTRUCTION offset $rbp, -16 
# | next:13'0                                      X error: no match found
# |          131:  renamable $rdi = IMPLICIT_DEF 
# | next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          132:  renamable $rsi = IMPLICIT_DEF 
# | next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          133:   
# | next:13'0     ~~
# |          134:  bb.4: 
# | next:13'0     ~~~~~~~
# |          135:  liveins: $rcx 
# | next:13'0     ~~~~~~~~~~~~~~~
# |            .
# |            .
# |            .
# |          141:  $rbp = frame-destroy POP64r implicit-def $rsp, implicit $rsp 
# | next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          142:  CFI_INSTRUCTION restore $rbp 
# | next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          143:  CFI_INSTRUCTION restore $r12 
# | next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          144:  CFI_INSTRUCTION restore $r13 
# | next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          145:  CFI_INSTRUCTION restore $r14 
# | next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          146:  CFI_INSTRUCTION def_cfa $rsp, 8 
# | next:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:13'1      ?                                possible intended match
# |          147:  RET 0, killed $rax 
# | next:13'0     ~~~~~~~~~~~~~~~~~~~~
# |          148: ... 
# | next:13'0     ~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/X86/segmented-stacks-dynamic.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\X86\segmented-stacks-dynamic.ll -mcpu=generic -mtriple=i686-linux -verify-machineinstrs | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\segmented-stacks-dynamic.ll -check-prefix=X86
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mcpu=generic -mtriple=i686-linux -verify-machineinstrs
# 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\segmented-stacks-dynamic.ll' -check-prefix=X86
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\segmented-stacks-dynamic.ll:64:13: error: X86-NEXT: is not on the line after the previous match
# | ; X86-NEXT: .cfi_restore %ebp
# |             ^
# | <stdin>:59:2: note: 'next' match was here
# |  .cfi_restore %ebp
# |  ^
# | <stdin>:57:9: note: previous match ended here
# | .LBB0_1:
# |         ^
# | <stdin>:58:1: note: non-matching line after previous match is here
# |  .cfi_restore %esi
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\segmented-stacks-dynamic.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |          .
# |          .
# |          .
# |         54:  popl %ebp 
# |         55:  .cfi_def_cfa %esp, 4 
# |         56:  retl 
# |         57: .LBB0_1: 
# |         58:  .cfi_restore %esi 
# |         59:  .cfi_restore %ebp 
# | next:64      !~~~~~~~~~~~~~~~~  error: match on wrong line
# |         60:  pushl $4 
# |         61:  pushl $12 
# |         62:  calll __morestack 
# |         63:  retl 
# |         64:  jmp .LBB0_2 
# |          .
# |          .
# |          .
# | >>>>>>
# `-----------------------------
# 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/177210


More information about the llvm-commits mailing list