[llvm] [CFIInstrInserter] Only track callee-saved registers. (PR #177210)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 21 10:36:55 PST 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 168690 tests passed
* 3000 tests skipped
* 3 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
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -o - /home/gha/actions-runner/_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 | /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/cfi-inserter-callee-save-register-2.mir
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -o - /home/gha/actions-runner/_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: /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/cfi-inserter-callee-save-register-2.mir
# .---command stderr------------
# | /home/gha/actions-runner/_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: /home/gha/actions-runner/_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
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/segmented-stacks-dynamic.ll -mcpu=generic -mtriple=i686-linux -verify-machineinstrs | /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/segmented-stacks-dynamic.ll -check-prefix=X86
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mcpu=generic -mtriple=i686-linux -verify-machineinstrs
# 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/segmented-stacks-dynamic.ll -check-prefix=X86
# .---command stderr------------
# | /home/gha/actions-runner/_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: /home/gha/actions-runner/_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>
<details>
<summary>LLVM.DebugInfo/MIR/X86/no-cfi-loc.mir</summary>
```
Exit Code: 2
Command Output (stdout):
--
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -start-after=prologepilog -mtriple=x86_64 -use-unknown-locations=Enable /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/MIR/X86/no-cfi-loc.mir -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/MIR/X86/no-cfi-loc.mir
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -start-after=prologepilog -mtriple=x86_64 -use-unknown-locations=Enable /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/MIR/X86/no-cfi-loc.mir -o -
# .---command stderr------------
# | llc: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/CFIInstrInserter.cpp:226: void (anonymous namespace)::CFIInstrInserter::initCSRsOrder(const MachineFunction &, const TargetRegisterInfo &): Assertion `DwarfRegNum >= 0 && "Expected non-negative dwarf register number."' failed.
# | 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 -start-after=prologepilog -mtriple=x86_64 -use-unknown-locations=Enable /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/MIR/X86/no-cfi-loc.mir -o -
# | 1. Running pass 'Function Pass Manager' on module '/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/MIR/X86/no-cfi-loc.mir'.
# | 2. Running pass 'Check CFA info and insert CFI instructions if needed' on function '@foo'
# | #0 0x0000000007f20998 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:842:13
# | #1 0x0000000007f1e0c5 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:109:18
# | #2 0x0000000007f21761 SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:429:38
# | #3 0x000079ddb5545330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# | #4 0x000079ddb559eb2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
# | #5 0x000079ddb554527e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
# | #6 0x000079ddb55288ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
# | #7 0x000079ddb552881b (/lib/x86_64-linux-gnu/libc.so.6+0x2881b)
# | #8 0x000079ddb553b517 (/lib/x86_64-linux-gnu/libc.so.6+0x3b517)
# | #9 0x0000000006d1dba2 calculateOutgoingCFAInfo /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/CFIInstrInserter.cpp:329:9
# | #10 0x0000000006d1dba2 updateSuccCFAInfo /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/CFIInstrInserter.cpp:415:5
# | #11 0x0000000006d1dba2 calculateCFAInfo /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/CFIInstrInserter.cpp:276:3
# | #12 0x0000000006d1dba2 (anonymous namespace)::CFIInstrInserter::runOnMachineFunction(llvm::MachineFunction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/CFIInstrInserter.cpp:54:5
# | #13 0x0000000006f10e43 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:0:10
# | #14 0x00000000074807a5 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1398:27
# | #15 0x0000000007488752 llvm::FPPassManager::runOnModule(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1444:13
# | #16 0x000000000748124c runOnModule /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1513:27
# | #17 0x000000000748124c llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:531:44
# | #18 0x0000000004d6162f 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:870:17
# | #19 0x0000000004d5e903 main /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llc/llc.cpp:458:13
# | #20 0x000079ddb552a1ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
# | #21 0x000079ddb552a28b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
# | #22 0x0000000004d5a425 _start (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc+0x4d5a425)
# `-----------------------------
# 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/DebugInfo/MIR/X86/no-cfi-loc.mir
# .---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/DebugInfo/MIR/X86/no-cfi-loc.mir
# `-----------------------------
# error: command failed with exit status: 2
--
```
</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