<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Assert in "Simple Register Coalescing" after load-store-opt in AMDGPU backend"
href="https://llvm.org/bugs/show_bug.cgi?id=27521">27521</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assert in "Simple Register Coalescing" after load-store-opt in AMDGPU backend
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Register Allocator
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>changpeng.fang@amd.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=16268" name="attach_16268" title="reduced.ll">attachment 16268</a> <a href="attachment.cgi?id=16268&action=edit" title="reduced.ll">[details]</a></span>
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@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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>