[llvm-bugs] [Bug 27521] New: Assert in "Simple Register Coalescing" after load-store-opt in AMDGPU backend

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Apr 25 16:04:44 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27521

            Bug ID: 27521
           Summary: Assert in "Simple Register Coalescing" after
                    load-store-opt in AMDGPU backend
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Register Allocator
          Assignee: unassignedbugs at nondot.org
          Reporter: changpeng.fang at amd.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16268
  --> https://llvm.org/bugs/attachment.cgi?id=16268&action=edit
reduced.ll

For the reduced case bug.ll attached, I see an assert in "Simple Register
Coalescing" pass. This pass was added after load-store-opt in AMDGPU backend.

chfang at fijilc:~/amd/llvm/build/bin$ ./llc -mtriple=amdgcn--amdhsa -mcpu=fiji
-mattr=+load-store-opt reduced.ll -o isa.txt
llc: /home/chfang/amd/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:414: void
extendSegmentsToUses(llvm::LiveRange&, const llvm::SlotIndexes&,
ShrinkToUsesWorkList&, const llvm::LiveRange&): Assertion
`OldRange.getVNInfoBefore(Stop) == VNI && "Wrong value out of predecessor"'
failed.
#0 0x00000000025c728f llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/chfang/amd/llvm/lib/Support/Unix/Signals.inc:322:0
#1 0x00000000025c75a4 PrintStackTraceSignalHandler(void*)
/home/chfang/amd/llvm/lib/Support/Unix/Signals.inc:380:0
#2 0x00000000025c5cbc llvm::sys::RunSignalHandlers()
/home/chfang/amd/llvm/lib/Support/Signals.cpp:44:0
#3 0x00000000025c6db6 SignalHandler(int)
/home/chfang/amd/llvm/lib/Support/Unix/Signals.inc:210:0
#4 0x00007faffe71f340 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#5 0x00007faffd93ecc9 gsignal
/build/eglibc-3GlaMS/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#6 0x00007faffd9420d8 abort
/build/eglibc-3GlaMS/eglibc-2.19/stdlib/abort.c:91:0
#7 0x00007faffd937b86 __assert_fail_base
/build/eglibc-3GlaMS/eglibc-2.19/assert/assert.c:92:0
#8 0x00007faffd937c32 (/lib/x86_64-linux-gnu/libc.so.6+0x2fc32)
#9 0x0000000001d8db43 extendSegmentsToUses(llvm::LiveRange&, llvm::SlotIndexes
const&, llvm::SmallVector<std::pair<llvm::SlotIndex, llvm::VNInfo*>, 16u>&,
llvm::LiveRange const&)
/home/chfang/amd/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:415:0
#10 0x0000000001d8e0ae llvm::LiveIntervals::shrinkToUses(llvm::LiveInterval*,
llvm::SmallVectorImpl<llvm::MachineInstr*>*)
/home/chfang/amd/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:472:0
#11 0x0000000001fceb4f
llvm::LiveRangeEdit::eliminateDeadDefs(llvm::SmallVectorImpl<llvm::MachineInstr*>&,
llvm::ArrayRef<unsigned int>)
/home/chfang/amd/llvm/lib/CodeGen/LiveRangeEdit.cpp:355:0
#12 0x0000000001eddde7 (anonymous
namespace)::RegisterCoalescer::eliminateDeadDefs()
/home/chfang/amd/llvm/lib/CodeGen/RegisterCoalescer.cpp:463:0
#13 0x0000000001ee2a53 (anonymous
namespace)::RegisterCoalescer::joinCopy(llvm::MachineInstr*, bool&)
/home/chfang/amd/llvm/lib/CodeGen/RegisterCoalescer.cpp:1375:0
#14 0x0000000001ee9fb8 (anonymous
namespace)::RegisterCoalescer::copyCoalesceWorkList(llvm::MutableArrayRef<llvm::MachineInstr*>)
/home/chfang/amd/llvm/lib/CodeGen/RegisterCoalescer.cpp:2812:0
#15 0x0000000001eeaad1 (anonymous
namespace)::RegisterCoalescer::coalesceLocals()
/home/chfang/amd/llvm/lib/CodeGen/RegisterCoalescer.cpp:2938:0
#16 0x0000000001eeaf30 (anonymous
namespace)::RegisterCoalescer::joinAllIntervals()
/home/chfang/amd/llvm/lib/CodeGen/RegisterCoalescer.cpp:2972:0
#17 0x0000000001eeb28a (anonymous
namespace)::RegisterCoalescer::runOnMachineFunction(llvm::MachineFunction&)
/home/chfang/amd/llvm/lib/CodeGen/RegisterCoalescer.cpp:3018:0
#18 0x0000000001e0a8f3
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/home/chfang/amd/llvm/lib/CodeGen/MachineFunctionPass.cpp:60:0
#19 0x00000000020fedf8 llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/chfang/amd/llvm/lib/IR/LegacyPassManager.cpp:1550:0
#20 0x00000000020fef8b llvm::FPPassManager::runOnModule(llvm::Module&)
/home/chfang/amd/llvm/lib/IR/LegacyPassManager.cpp:1571:0
#21 0x00000000020ff326 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/chfang/amd/llvm/lib/IR/LegacyPassManager.cpp:1627:0
#22 0x00000000020ffa76 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/chfang/amd/llvm/lib/IR/LegacyPassManager.cpp:1730:0
#23 0x00000000020ffcb7 llvm::legacy::PassManager::run(llvm::Module&)
/home/chfang/amd/llvm/lib/IR/LegacyPassManager.cpp:1762:0
#24 0x0000000000dbf7a0 compileModule(char**, llvm::LLVMContext&)
/home/chfang/amd/llvm/tools/llc/llc.cpp:415:0
#25 0x0000000000dbe575 main /home/chfang/amd/llvm/tools/llc/llc.cpp:218:0
#26 0x00007faffd929ec5 __libc_start_main
/build/eglibc-3GlaMS/eglibc-2.19/csu/libc-start.c:321:0
#27 0x0000000000dbcdf9 _start (/home/chfang/amd/llvm/build/bin/llc+0xdbcdf9)
Stack dump:
0.    Program arguments: ./llc -mtriple=amdgcn--amdhsa -mcpu=fiji
-mattr=+load-store-opt reduced.ll -o isa.txt 
1.    Running pass 'Function Pass Manager' on module 'reduced.ll'.
2.    Running pass 'Si
mple Register Coalescing' on function '@test'
Aborted (core dumped)


Note that the commandline is:
./llc -mtriple=amdgcn--amdhsa -mcpu=fiji -mattr=+load-store-opt reduced.ll -o
isa.txt

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160425/00626991/attachment.html>


More information about the llvm-bugs mailing list