[llvm] [MCP] Add test case to demonstrate issue with spill copy elimination (NFC) (PR #206855)
LLVM Continuous Integration via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 4 18:03:56 PDT 2026
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-expensive-checks-debian` running on `gribozavr4` while building `llvm` at step 6 "test-build-unified-tree-check-all".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/16/builds/2148
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AArch64/machine-cp-spill-chain-across-call.mir' FAILED ********************
Exit Code: 2
Command Output (stdout):
--
# RUN: at line 1
/b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc -mtriple=aarch64 -run-pass=machine-cp -enable-spill-copy-elim -o - /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AArch64/machine-cp-spill-chain-across-call.mir | /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/FileCheck /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AArch64/machine-cp-spill-chain-across-call.mir
# executed command: /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc -mtriple=aarch64 -run-pass=machine-cp -enable-spill-copy-elim -o - /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AArch64/machine-cp-spill-chain-across-call.mir
# .---command stderr------------
# |
# | # After Machine Copy Propagation Pass
# | # Machine code for function no_fold_spill_chain_across_call: IsSSA, NoPHIs, TracksLiveness, NoVRegs
# | Frame Objects:
# | fi#0: size=8, align=8, at location [SP]
# | save/restore points:
# | save points are empty
# | restore points are empty
# |
# | bb.0:
# | liveins: $lr, $x16, $x20, $x23, $x26
# | renamable $x26 = COPY killed renamable $x23
# | ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
# | BL @callee, <regmask $fp $lr $wzr $wzr_hi $xzr $b8 $b9 $b10 $b11 $b12 $b13 $b14 $b15 $d8 $d9 $d10 $d11 $d12 $d13 $d14 $d15 $h8 $h9 $h10 $h11 $h12 $h13 $h14 $h15 $s8 $s9 $s10 $s11 and 92 more...>, implicit-def dead $lr, implicit $sp, implicit-def $sp
# | ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
# | $x23 = COPY killed renamable $x20
# | renamable $x20 = LDRXui %stack.0, 0 :: (load (s64) from %stack.0)
# | STRXui killed renamable $x20, %stack.0, 0 :: (store (s64) into %stack.0)
# | renamable $x20 = COPY killed $x23
# | RET_ReallyLR implicit $x16, implicit $x20
# |
# | # End machine code for function no_fold_spill_chain_across_call.
# |
# | *** Bad machine code: Using an undefined physical register ***
# | - function: no_fold_spill_chain_across_call
# | - basic block: %bb.0 (0xbf099b0)
# | - instruction: RET_ReallyLR implicit $x16, implicit $x20
# | - operand 0: implicit $x16
# | 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: /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc -mtriple=aarch64 -run-pass=machine-cp -enable-spill-copy-elim -o - /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AArch64/machine-cp-spill-chain-across-call.mir
# | 1. Running pass 'Function Pass Manager' on module '/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AArch64/machine-cp-spill-chain-across-call.mir'.
# | 2. Running pass 'Verify generated machine code' on function '@no_fold_spill_chain_across_call'
# | #0 0x0000000003e4a16a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc+0x3e4a16a)
# | #1 0x0000000003e4704e llvm::sys::RunSignalHandlers() (/b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc+0x3e4704e)
# | #2 0x0000000003e4af2a SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
# | #3 0x00007f9a89152170 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x13170)
# | #4 0x00007f9a88c66d61 raise (/lib/x86_64-linux-gnu/libc.so.6+0x38d61)
# | #5 0x00007f9a88c50537 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22537)
# | #6 0x0000000003da447d llvm::report_fatal_error(llvm::Twine const&, bool) (/b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc+0x3da447d)
...
```
</details>
https://github.com/llvm/llvm-project/pull/206855
More information about the llvm-commits
mailing list