LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 32773 - UNREACHABLE "Couldn't join subrange" in RegisterCoalescer (out-of-tree backend)
Summary: UNREACHABLE "Couldn't join subrange" in RegisterCoalescer (out-of-tree backend)
Status: NEW
Alias: None
Product: new-bugs
Classification: Unclassified
Component: new bugs (show other bugs)
Version: 4.0
Hardware: PC Linux
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-24 13:16 PDT by Nick Johnson
Modified: 2017-06-20 02:07 PDT (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments
llc bugpoint-reduced-simplified.bc -verify-machineinstrs -debug-only=regalloc 2>log (32.89 KB, text/plain)
2017-04-24 13:16 PDT, Nick Johnson
Details
bugpoint-reduced-simplified.bc (1.64 KB, application/octet-stream)
2017-04-24 13:17 PDT, Nick Johnson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Johnson 2017-04-24 13:16:03 PDT
Created attachment 18344 [details]
llc bugpoint-reduced-simplified.bc  -verify-machineinstrs -debug-only=regalloc 2>log

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::MutableArrayRef<llvm::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
...
Comment 1 Nick Johnson 2017-04-24 13:17:06 PDT
Created attachment 18345 [details]
bugpoint-reduced-simplified.bc

Adding testcase
Comment 2 Matt Arsenault 2017-05-24 05:13:16 PDT
33152 hits the same error with AMDGPU