[llvm] Reland "RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG" (PR #168353)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 18 04:48:59 PST 2025


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 166073 tests passed
* 2838 tests skipped
* 3 tests failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/BPF/32-bit-subreg-peephole-phi-1.ll</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -O2 -mtriple=bpfel -mcpu=v2 -mattr=+alu32 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/BPF/32-bit-subreg-peephole-phi-1.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/BPF/32-bit-subreg-peephole-phi-1.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -O2 -mtriple=bpfel -mcpu=v2 -mattr=+alu32
# .---command stderr------------
# | 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 -O2 -mtriple=bpfel -mcpu=v2 -mattr=+alu32
# | 1.	Running pass 'Function Pass Manager' on module '<stdin>'.
# | 2.	Running pass 'Register Coalescer' on function '@test'
# |  #0 0x0000000007ebc608 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:834:13
# |  #1 0x0000000007eb9d15 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:105:18
# |  #2 0x0000000007ebd3d1 SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:426:38
# |  #3 0x00007acc6c7c1330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# |  #4 0x00000000071308b1 findPrecedingDefs /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:2166:10
# |  #5 0x00000000071308b1 (anonymous namespace)::RegisterCoalescer::joinCopy(llvm::MachineInstr*, bool&, llvm::SmallPtrSetImpl<llvm::MachineInstr*>&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:2332:10
# |  #6 0x000000000712eab3 (anonymous namespace)::RegisterCoalescer::copyCoalesceWorkList(llvm::MutableArrayRef<llvm::MachineInstr*>) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4246:17
# |  #7 0x000000000712be0a copyCoalesceInMBB /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4373:7
# |  #8 0x000000000712be0a joinAllIntervals /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4408:5
# |  #9 0x000000000712be0a (anonymous namespace)::RegisterCoalescer::run(llvm::MachineFunction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4504:5
# | #10 0x000000000712d4c3 (anonymous namespace)::RegisterCoalescerLegacy::runOnMachineFunction(llvm::MachineFunction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4445:15
# | #11 0x0000000006ebf153 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:0:10
# | #12 0x000000000742e325 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1398:27
# | #13 0x00000000074362d2 llvm::FPPassManager::runOnModule(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1444:13
# | #14 0x000000000742edcc runOnModule /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1513:27
# | #15 0x000000000742edcc llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:531:44
# | #16 0x0000000004da12c8 compileModule(char**, 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:0:8
# | #17 0x0000000004d9e660 main /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llc/llc.cpp:451:13
# | #18 0x00007acc6c7a61ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
# | #19 0x00007acc6c7a628b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
# | #20 0x0000000004d9a0e5 _start (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc+0x4d9a0e5)
# `-----------------------------
# error: command failed with exit status: -11
# 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/BPF/32-bit-subreg-peephole-phi-1.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/BPF/32-bit-subreg-peephole-phi-1.ll
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>
<details>
<summary>LLVM.CodeGen/BPF/remove_truncate_7.ll</summary>

```
Exit Code: 2

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/BPF/remove_truncate_7.ll -mtriple=bpf -mattr=+alu32 -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/BPF/remove_truncate_7.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=bpf -mattr=+alu32 -verify-machineinstrs
# .---command stderr------------
# | 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 -mtriple=bpf -mattr=+alu32 -verify-machineinstrs
# | 1.	Running pass 'Function Pass Manager' on module '<stdin>'.
# | 2.	Running pass 'Register Coalescer' on function '@test'
# |  #0 0x0000000007ebc608 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:834:13
# |  #1 0x0000000007eb9d15 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:105:18
# |  #2 0x0000000007ebd3d1 SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:426:38
# |  #3 0x00007f6c41889330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# |  #4 0x00000000071308b1 findPrecedingDefs /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:2166:10
# |  #5 0x00000000071308b1 (anonymous namespace)::RegisterCoalescer::joinCopy(llvm::MachineInstr*, bool&, llvm::SmallPtrSetImpl<llvm::MachineInstr*>&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:2332:10
# |  #6 0x000000000712eab3 (anonymous namespace)::RegisterCoalescer::copyCoalesceWorkList(llvm::MutableArrayRef<llvm::MachineInstr*>) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4246:17
# |  #7 0x000000000712be0a copyCoalesceInMBB /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4373:7
# |  #8 0x000000000712be0a joinAllIntervals /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4408:5
# |  #9 0x000000000712be0a (anonymous namespace)::RegisterCoalescer::run(llvm::MachineFunction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4504:5
# | #10 0x000000000712d4c3 (anonymous namespace)::RegisterCoalescerLegacy::runOnMachineFunction(llvm::MachineFunction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4445:15
# | #11 0x0000000006ebf153 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:0:10
# | #12 0x000000000742e325 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1398:27
# | #13 0x00000000074362d2 llvm::FPPassManager::runOnModule(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1444:13
# | #14 0x000000000742edcc runOnModule /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1513:27
# | #15 0x000000000742edcc llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:531:44
# | #16 0x0000000004da12c8 compileModule(char**, 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:0:8
# | #17 0x0000000004d9e660 main /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llc/llc.cpp:451:13
# | #18 0x00007f6c4186e1ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
# | #19 0x00007f6c4186e28b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
# | #20 0x0000000004d9a0e5 _start (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc+0x4d9a0e5)
# `-----------------------------
# error: command failed with exit status: -11
# 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/BPF/remove_truncate_7.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/BPF/remove_truncate_7.ll
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>
<details>
<summary>LLVM.CodeGen/MSP430/shifts.ll</summary>

```
Exit Code: 2

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/MSP430/shifts.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/MSP430/shifts.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc
# .---command stderr------------
# | 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
# | 1.	Running pass 'Function Pass Manager' on module '<stdin>'.
# | 2.	Running pass 'Register Coalescer' on function '@lshr8'
# |  #0 0x0000000007ebc608 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:834:13
# |  #1 0x0000000007eb9d15 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:105:18
# |  #2 0x0000000007ebd3d1 SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:426:38
# |  #3 0x00007ca554535330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# |  #4 0x00000000071308b1 findPrecedingDefs /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:2166:10
# |  #5 0x00000000071308b1 (anonymous namespace)::RegisterCoalescer::joinCopy(llvm::MachineInstr*, bool&, llvm::SmallPtrSetImpl<llvm::MachineInstr*>&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:2332:10
# |  #6 0x000000000712eab3 (anonymous namespace)::RegisterCoalescer::copyCoalesceWorkList(llvm::MutableArrayRef<llvm::MachineInstr*>) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4246:17
# |  #7 0x000000000712be0a copyCoalesceInMBB /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4373:7
# |  #8 0x000000000712be0a joinAllIntervals /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4408:5
# |  #9 0x000000000712be0a (anonymous namespace)::RegisterCoalescer::run(llvm::MachineFunction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4504:5
# | #10 0x000000000712d4c3 (anonymous namespace)::RegisterCoalescerLegacy::runOnMachineFunction(llvm::MachineFunction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/RegisterCoalescer.cpp:4445:15
# | #11 0x0000000006ebf153 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:0:10
# | #12 0x000000000742e325 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1398:27
# | #13 0x00000000074362d2 llvm::FPPassManager::runOnModule(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1444:13
# | #14 0x000000000742edcc runOnModule /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1513:27
# | #15 0x000000000742edcc llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:531:44
# | #16 0x0000000004da12c8 compileModule(char**, 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:0:8
# | #17 0x0000000004d9e660 main /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llc/llc.cpp:451:13
# | #18 0x00007ca55451a1ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
# | #19 0x00007ca55451a28b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
# | #20 0x0000000004d9a0e5 _start (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc+0x4d9a0e5)
# `-----------------------------
# error: command failed with exit status: -11
# 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/MSP430/shifts.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/MSP430/shifts.ll
# `-----------------------------
# 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/168353


More information about the llvm-commits mailing list