[llvm-bugs] [Bug 36244] New: opt crashes with "opt -inline -sroa -lcssa -loop-rotate -instcombine -jump-threading": Assertion `PN->use_empty() && "Trying to remove a phi with uses."' failed
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Feb 5 16:10:16 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=36244
Bug ID: 36244
Summary: opt crashes with "opt -inline -sroa -lcssa
-loop-rotate -instcombine -jump-threading": Assertion
`PN->use_empty() && "Trying to remove a phi with
uses."' failed
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: su at cs.ucdavis.edu
CC: llvm-bugs at lists.llvm.org
Tested with trunk revision 324265.
$ clangpolly -v
clang version 7.0.0 (http://llvm.org/git/clang.git
9658e036b90bc92b86c96a213d89fe87475701db) (llvm/trunk 324265)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/su/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9.4
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.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.2.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$
$ clangpolly -O3 -mllvm -disable-llvm-optzns -c -emit-llvm -o small.bc small.c
$ optpolly -inline -sroa -lcssa -loop-rotate -instcombine -jump-threading -o
small-opt.bc small.bc
optpolly: /home/su/software/tmp/polly/llvm/lib/Transforms/Utils/LCSSA.cpp:226:
bool llvm::formLCSSAForInstructions(llvm::SmallVectorImpl<llvm::Instruction*>&,
llvm::DominatorTree&, llvm::LoopInfo&): Assertion `PN->use_empty() && "Trying
to remove a phi with uses."' failed.
LLVMSymbolizer: error reading file: No such file or directory
#0 0x00000000020a618a (optpolly+0x20a618a)
#1 0x00000000020a433e (optpolly+0x20a433e)
#2 0x00000000020a44a0 (optpolly+0x20a44a0)
#3 0x00007f7100043330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007f70fee2bc37 gsignal
/build/eglibc-SvCtMH/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007f70fee2f028 abort
/build/eglibc-SvCtMH/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007f70fee24bf6 __assert_fail_base
/build/eglibc-SvCtMH/eglibc-2.19/assert/assert.c:92:0
#7 0x00007f70fee24ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x0000000002108f85 (optpolly+0x2108f85)
#9 0x0000000002109625 (optpolly+0x2109625)
#10 0x00000000021099df (optpolly+0x21099df)
#11 0x00000000021099c5 (optpolly+0x21099c5)
#12 0x00000000021099c5 (optpolly+0x21099c5)
#13 0x00000000021099c5 (optpolly+0x21099c5)
#14 0x00000000021099c5 (optpolly+0x21099c5)
#15 0x000000000210a055 (optpolly+0x210a055)
#16 0x0000000001b975eb (optpolly+0x1b975eb)
#17 0x00000000015ff5e6 (optpolly+0x15ff5e6)
#18 0x0000000001b982fa (optpolly+0x1b982fa)
#19 0x00000000008c5785 (optpolly+0x8c5785)
#20 0x00007f70fee16f45 __libc_start_main
/build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#21 0x0000000000939486 (optpolly+0x939486)
Stack dump:
0. Program arguments: optpolly -inline -sroa -lcssa -loop-rotate
-instcombine -jump-threading -o small-opt.bc small.bc
1. Running pass 'CallGraph Pass Manager' on module 'small.bc'.
2. Running pass 'Loop-Closed SSA Form Pass' on function '@main'
Aborted (core dumped)
$
--------------------------------
int a, b, c, d, e, f, g, i, j;
volatile int h;
void fn1 ()
{
int l = 0, m;
for (j = 0; j < 1;)
{
int n = 1;
if (n)
{
L:
while (f)
m++;
if (a)
goto L;
l++;
if (l)
break;
if (d)
goto L;
}
if (b || e)
if (!c)
goto L;
if ((i || i) && g)
{
int p;
if (i)
continue;
goto L;
}
h;
}
}
int main ()
{
fn1 ();
return 0;
}
--
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/20180206/34d82a06/attachment-0001.html>
More information about the llvm-bugs
mailing list