UNREACHABLE "Couldn't join subrange" in RegisterCoalescer (out-of-tree backend) #32120
Labels
bugzilla
Issues migrated from bugzilla
incomplete
Issue not complete (e.g. missing a reproducer, build arguments, etc.)
llvm:codegen
Extended Description
While lowering a small testcase for my out-of-tree target, llc experiences an UNREACHABLE during RegisterCoalescer. I have not been able to reproduce this with a stock target. This testcase passes -verify-machineinstrs.
Here's a backtrace of the failure. I've also attached a log with -debug-only=regalloc
*** Couldn't join subrange!
UNREACHABLE executed at /d/en/johnsoni-0/gctools/llvm/lib/CodeGen/RegisterCoalescer.cpp:2693!
#0 0x00000000027395af llvm::sys::PrintStackTrace(llvm::raw_ostream&) /d/en/johnsoni-0/gctools/llvm/lib/Support/Unix/Signals.inc:402:0
#1 0x0000000002739971 PrintStackTraceSignalHandler(void*) /d/en/johnsoni-0/gctools/llvm/lib/Support/Unix/Signals.inc:466:0
#2 0x0000000002737bce llvm::sys::RunSignalHandlers() /d/en/johnsoni-0/gctools/llvm/lib/Support/Signals.cpp:44:0
#3 0x0000000002738f41 SignalHandler(int) /d/en/johnsoni-0/gctools/llvm/lib/Support/Unix/Signals.inc:256:0
#4 0x000000396140f7e0 __restore_rt (/lib64/libpthread.so.0+0x396140f7e0)
#5 0x0000003960c325e5 __GI_raise (/lib64/libc.so.6+0x3960c325e5)
#6 0x0000003960c33dc5 __GI_abort (/lib64/libc.so.6+0x3960c33dc5)
#7 0x00000000026d4c42 bindingsErrorHandler(void*, std::string const&, bool) /d/en/johnsoni-0/gctools/llvm/lib/Support/ErrorHandling.cpp:127:0
#8 0x0000000001fdbc85 (anonymous namespace)::RegisterCoalescer::joinSubRegRanges(llvm::LiveRange&, llvm::LiveRange&, llvm::LaneBitmask, llvm::CoalescerPair const&) /d/en/johnsoni-0/gctools/llvm/lib/CodeGen/RegisterCoalescer.cpp:2695:0
#9 0x0000000001fdc3df (anonymous namespace)::RegisterCoalescer::mergeSubRangeInto(llvm::LiveInterval&, llvm::LiveRange const&, llvm::LaneBitmask, llvm::CoalescerPair&) /d/en/johnsoni-0/gctools/llvm/lib/CodeGen/RegisterCoalescer.cpp:2769:0
#10 0x0000000001fdcbd5 (anonymous namespace)::RegisterCoalescer::joinVirtRegs(llvm::CoalescerPair&) /d/en/johnsoni-0/gctools/llvm/lib/CodeGen/RegisterCoalescer.cpp:2832:0
#11 0x0000000001fdd174 (anonymous namespace)::RegisterCoalescer::joinIntervals(llvm::CoalescerPair&) /d/en/johnsoni-0/gctools/llvm/lib/CodeGen/RegisterCoalescer.cpp:2892:0
#12 0x0000000001fd5fc3 (anonymous namespace)::RegisterCoalescer::joinCopy(llvm::MachineInstr*, bool&) /d/en/johnsoni-0/gctools/llvm/lib/CodeGen/RegisterCoalescer.cpp:1468:0
#13 0x0000000001fdd4b6 (anonymous namespace)::RegisterCoalescer::copyCoalesceWorkList(llvm::MutableArrayRefllvm::MachineInstr*) /d/en/johnsoni-0/gctools/llvm/lib/CodeGen/RegisterCoalescer.cpp:2962:0
#14 0x0000000001fddf32 (anonymous namespace)::RegisterCoalescer::coalesceLocals() /d/en/johnsoni-0/gctools/llvm/lib/CodeGen/RegisterCoalescer.cpp:3087:0
#15 0x0000000001fde3a1 (anonymous namespace)::RegisterCoalescer::joinAllIntervals() /d/en/johnsoni-0/gctools/llvm/lib/CodeGen/RegisterCoalescer.cpp:3121:0
#16 0x0000000001fde6e2 (anonymous namespace)::RegisterCoalescer::runOnMachineFunction(llvm::MachineFunction&) /d/en/johnsoni-0/gctools/llvm/lib/CodeGen/RegisterCoalescer.cpp:3167:0
#17 0x0000000001d28d87 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /d/en/johnsoni-0/gctools/llvm/lib/CodeGen/MachineFunctionPass.cpp:62:0
...
The text was updated successfully, but these errors were encountered: