| Issue |
63446
|
| Summary |
Error while trying to spill R0 from class IntRegs
|
| Labels |
backend:Hexagon,
llvm:crash
|
| Assignees |
|
| Reporter |
chfast
|
```
LLVM ERROR: Error while trying to spill R0 from class IntRegs: Cannot scavenge register without an emergency spill slot!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel <source>
1. Running pass 'Function Pass Manager' on module '<source>'.
2. Running pass 'Prologue/Epilogue Insertion & Frame Finalization' on function '@f'
#0 0x0000556028485fbf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3586fbf)
#1 0x0000556028483714 SignalHandler(int) Signals.cpp:0:0
#2 0x00007f50a3cb1420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#3 0x00007f50a377e00b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
#4 0x00007f50a375d859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
#5 0x00005560256d6a6a llvm::SuffixTree::insertLeaf(llvm::SuffixTreeInternalNode&, unsigned int, unsigned int) (.cold) SuffixTree.cpp:0:0
#6 0x000055602791d5a5 llvm::RegScavenger::spill(llvm::Register, llvm::TargetRegisterClass const&, int, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2a1e5a5)
#7 0x000055602791de21 llvm::RegScavenger::scavengeRegisterBackwards(llvm::TargetRegisterClass const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>, bool, int, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2a1ee21)
#8 0x000055602791ee51 scavengeFrameVirtualRegsInBlock(llvm::MachineRegisterInfo&, llvm::RegScavenger&, llvm::MachineBasicBlock&) RegisterScavenging.cpp:0:0
#9 0x000055602791f28b llvm::scavengeFrameVirtualRegs(llvm::MachineFunction&, llvm::RegScavenger&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2a2028b)
#10 0x0000556027883fb8 (anonymous namespace)::PEI::runOnMachineFunction(llvm::MachineFunction&) PrologEpilogInserter.cpp:0:0
#11 0x00005560277148ce llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#12 0x0000556027cab3f1 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2dac3f1)
#13 0x0000556027cab639 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2dac639)
#14 0x0000556027cabeb2 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2daceb2)
#15 0x0000556025793744 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
```
```llvm
target triple = "hexagon-unknown-linux-gnu"
define i64 @f(i1 %0, i1 %1, float %2, ptr %G, ptr %G.9, i1 %C4, ptr %G2, ptr %A9, i64 %LGV.pre, i64 %LGV1, ptr %G7, i64 %B11) {
BB:
%A91 = alloca i1, i32 0, align 1
br label %BB1
BB1: ; preds = %BB6, %BB1, %BB
store i16 0, ptr %G.9, align 2
br i1 %C4, label %BB1, label %BB5
BB5: ; preds = %BB1
store ptr %G2, ptr %G, align 8
%C1 = icmp ugt i64 %LGV.pre, 0
store i16 0, ptr %A91, align 2
br label %BB2
BB2: ; preds = %BB2, %BB5
store i1 false, ptr %G7, align 1
store i1 %1, ptr %A9, align 1
store i1 %0, ptr %G, align 1
br i1 %C1, label %BB2, label %BB6
BB6: ; preds = %BB2
%C3 = fcmp uge float 0.000000e+00, %2
br i1 %C3, label %BB1, label %BB3
BB3: ; preds = %BB6
%B3 = mul i64 %B11, %LGV1
ret i64 %B3
}
```
https://godbolt.org/z/nrKMG4o4d
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs