<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - loop-interchange crashes: Assertion `all_of(P.users(), [OuterHeader, OuterExit, IncI, InnerHeader](User *U) { return (cast<PHINode>(U)->getParent() == OuterHeader && IncI->getParent() == InnerHeader) || cast<PHINode>(U)->getParent() == OuterExit; }) && "C"
href="https://bugs.llvm.org/show_bug.cgi?id=43532">43532</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>loop-interchange crashes: Assertion `all_of(P.users(), [OuterHeader, OuterExit, IncI, InnerHeader](User *U) { return (cast<PHINode>(U)->getParent() == OuterHeader && IncI->getParent() == InnerHeader) || cast<PHINode>(U)->getParent() == OuterExit; }) && "C
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>cszide@163.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=22614" name="attach_22614" title="ua.S.x.bc">attachment 22614</a> <a href="attachment.cgi?id=22614&action=edit" title="ua.S.x.bc">[details]</a></span>
ua.S.x.bc
$clang -v
clang version 10.0.0 (trunk 373303)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$opt -loop-rotate -licm -jump-threading -early-cse-memssa -loop-interchange
-loop-interchange ua.S.x.bc
WARNING: You're attempting to print out a bitcode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bitcode first-hand, you
can force output with the `-f' option.
opt:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/lib/Transforms/Scalar/LoopInterchange.cpp:1370:
void moveLCSSAPhis(llvm::BasicBlock*, llvm::BasicBlock*, llvm::BasicBlock*,
llvm::BasicBlock*, llvm::BasicBlock*, llvm::BasicBlock*): Assertion
`all_of(P.users(), [OuterHeader, OuterExit, IncI, InnerHeader](User *U) {
return (cast<PHINode>(U)->getParent() == OuterHeader && IncI->getParent() ==
InnerHeader) || cast<PHINode>(U)->getParent() == OuterExit; }) && "Can only
replace phis iff the uses are in the loop nest exit or " "the incoming value is
defined in the inner header (it will " "dominate all loop blocks after
interchanging)"' failed.
Stack dump:
0. Program arguments:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt -loop-rotate
-licm -jump-threading -early-cse-memssa -loop-interchange -loop-interchange
ua.S.x.bc
1. Running pass 'Function Pass Manager' on module 'ua.S.x.bc'.
2. Running pass 'Loop Pass Manager' on function '@setdef'
3. Running pass 'Interchanges loops for cache reuse' on basic block
'%for.inc'
#0 0x0000557928def55a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x278655a)
#1 0x0000557928ded234 llvm::sys::RunSignalHandlers()
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x2784234)
#2 0x0000557928ded372 SignalHandler(int)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x2784372)
#3 0x00007fe222d48890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
#4 0x00007fe2219fae97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#5 0x00007fe2219fc801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
#6 0x00007fe2219ec39a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
#7 0x00007fe2219ec412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
#8 0x0000557928be180d (anonymous
namespace)::LoopInterchangeTransform::transform()
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x257880d)
#9 0x0000557928be4b95 (anonymous
namespace)::LoopInterchange::processLoopList(llvm::SmallVector<llvm::Loop*,
8u>)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x257bb95)
#10 0x0000557928be57dd (anonymous
namespace)::LoopInterchange::runOnLoop(llvm::Loop*, llvm::LPPassManager&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x257c7dd)
#11 0x00005579280bc33b llvm::LPPassManager::runOnFunction(llvm::Function&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x1a5333b)
#12 0x000055792872b309 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x20c2309)
#13 0x000055792872b3d9 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x20c23d9)
#14 0x000055792872a561 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x20c1561)
#15 0x0000557926efddbf main
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x894dbf)
#16 0x00007fe2219ddb97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#17 0x0000557926f75f4a _start
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x90cf4a)
Aborted (core dumped)
The optimization sequence can be reduced to "-loop-interchange
-loop-interchange" using bugpoint.
$opt bugpoint-reduced-simplified.bc -loop-interchange -loop-interchange
WARNING: You're attempting to print out a bitcode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bitcode first-hand, you
can force output with the `-f' option.
opt:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/lib/Transforms/Scalar/LoopInterchange.cpp:1370:
void moveLCSSAPhis(llvm::BasicBlock*, llvm::BasicBlock*, llvm::BasicBlock*,
llvm::BasicBlock*, llvm::BasicBlock*, llvm::BasicBlock*): Assertion
`all_of(P.users(), [OuterHeader, OuterExit, IncI, InnerHeader](User *U) {
return (cast<PHINode>(U)->getParent() == OuterHeader && IncI->getParent() ==
InnerHeader) || cast<PHINode>(U)->getParent() == OuterExit; }) && "Can only
replace phis iff the uses are in the loop nest exit or " "the incoming value is
defined in the inner header (it will " "dominate all loop blocks after
interchanging)"' failed.
Stack dump:
0. Program arguments:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt
bugpoint-reduced-simplified.bc -loop-interchange -loop-interchange
1. Running pass 'Function Pass Manager' on module
'bugpoint-reduced-simplified.bc'.
2. Running pass 'Loop Pass Manager' on function '@setdef'
3. Running pass 'Interchanges loops for cache reuse' on basic block
'%for.inc'
#0 0x000055ab6f79f55a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x278655a)
#1 0x000055ab6f79d234 llvm::sys::RunSignalHandlers()
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x2784234)
#2 0x000055ab6f79d372 SignalHandler(int)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x2784372)
#3 0x00007fb9c51d5890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
#4 0x00007fb9c3e87e97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#5 0x00007fb9c3e89801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
#6 0x00007fb9c3e7939a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
#7 0x00007fb9c3e79412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
#8 0x000055ab6f59180d (anonymous
namespace)::LoopInterchangeTransform::transform()
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x257880d)
#9 0x000055ab6f594b95 (anonymous
namespace)::LoopInterchange::processLoopList(llvm::SmallVector<llvm::Loop*,
8u>)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x257bb95)
#10 0x000055ab6f5957dd (anonymous
namespace)::LoopInterchange::runOnLoop(llvm::Loop*, llvm::LPPassManager&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x257c7dd)
#11 0x000055ab6ea6c33b llvm::LPPassManager::runOnFunction(llvm::Function&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x1a5333b)
#12 0x000055ab6f0db309 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x20c2309)
#13 0x000055ab6f0db3d9 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x20c23d9)
#14 0x000055ab6f0da561 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x20c1561)
#15 0x000055ab6d8addbf main
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x894dbf)
#16 0x00007fb9c3e6ab97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#17 0x000055ab6d925f4a _start
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/opt+0x90cf4a)
Aborted (core dumped)</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>