<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 if the first phi node of a header is not an induction node"
href="https://bugs.llvm.org/show_bug.cgi?id=48212">48212</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Loop-Interchange crashes if the first phi node of a header is not an induction node
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</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>opt
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>flemairen6@gmail.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=24179" name="attach_24179" title="IR file that causes the crash to happen.">attachment 24179</a> <a href="attachment.cgi?id=24179&action=edit" title="IR file that causes the crash to happen.">[details]</a></span>
IR file that causes the crash to happen.
$ clang test.c -Xclang -disable-O0-optnone -emit-llvm -O0 -S -o test.ll
$ opt -mem2reg -loop-rotate -loop-interchange test.ll
opt: llvm-project/llvm/lib/Transforms/Scalar/LoopInterchange.cpp:1583: bool
(anonymous namespace)::LoopInterchangeTransform::adjustLoopBranches():
Assertion `OuterInnerReductions.find(PHI) != OuterInnerReductions.end() &&
"Expected a reduction PHI node"' failed.
And then there is the stacktrace.
test.c :
void foo (int filter[5][5]){
int k1, k2;
int temp, mul;
L1:for (k1=0;k1<5;k1++){
L2:for (k2=0;k2<3;k2++){
mul = filter[k2][k1];
temp += mul;
}
}
}
int main() {
int filter[5][5];
foo(filter);
}
Build :
LLVM (<a href="http://llvm.org/">http://llvm.org/</a>):
LLVM version 11.0.0git
DEBUG build with assertions.
Default target: x86_64-unknown-linux-gnu
Host CPU: skylake</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>