[llvm-bugs] [Bug 48212] New: Loop-Interchange crashes if the first phi node of a header is not an induction node
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Nov 18 02:36:06 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=48212
Bug ID: 48212
Summary: Loop-Interchange crashes if the first phi node of a
header is not an induction node
Product: tools
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: opt
Assignee: unassignedbugs at nondot.org
Reporter: flemairen6 at gmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 24179
--> https://bugs.llvm.org/attachment.cgi?id=24179&action=edit
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 (http://llvm.org/):
LLVM version 11.0.0git
DEBUG build with assertions.
Default target: x86_64-unknown-linux-gnu
Host CPU: skylake
--
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/20201118/dc268521/attachment.html>
More information about the llvm-bugs
mailing list