<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 - opt crashes with "opt -sroa -adce -lcssa -indvars": Assertion `L->isRecursivelyLCSSAForm(*DT, *LI) && "Requested to preserve LCSSA, but it's already broken."' failed"
href="https://bugs.llvm.org/show_bug.cgi?id=33963">33963</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>opt crashes with "opt -sroa -adce -lcssa -indvars": Assertion `L->isRecursivelyLCSSAForm(*DT, *LI) && "Requested to preserve LCSSA, but it's already broken."' failed
</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>All
</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>su@cs.ucdavis.edu
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>$ clang -v
clang version 6.0.0 (trunk 309139)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/clang-trunk/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.0.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.4
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.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.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.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$
$ clang -O3 -mllvm -disable-llvm-optzns -w -c -emit-llvm -o small.bc small.c
$ opt -sroa -adce -lcssa -indvars -o small-opt.bc small.bc
opt:
/tmp/llvm-builder/llvm-source-trunk/lib/Transforms/Utils/LoopSimplify.cpp:697:
bool llvm::simplifyLoop(llvm::Loop*, llvm::DominatorTree*, llvm::LoopInfo*,
llvm::ScalarEvolution*, llvm::AssumptionCache*, bool): Assertion
`L->isRecursivelyLCSSAForm(*DT, *LI) && "Requested to preserve LCSSA, but it's
already broken."' failed.
#0 0x0000000001e69d9a (opt+0x1e69d9a)
#1 0x0000000001e67b0e (opt+0x1e67b0e)
#2 0x0000000001e67c82 (opt+0x1e67c82)
#3 0x00007ffa6390b390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x00007ffa6267d428 gsignal
/build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007ffa6267f02a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007ffa62675bd7 __assert_fail_base
/build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
#7 0x00007ffa62675c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x0000000001eeb3b1 (opt+0x1eeb3b1)
#9 0x0000000001eeb62f (opt+0x1eeb62f)
#10 0x000000000195aa23 (opt+0x195aa23)
#11 0x000000000195aaec (opt+0x195aaec)
#12 0x000000000195a58d (opt+0x195a58d)
#13 0x00000000006dd75c (opt+0x6dd75c)
#14 0x00007ffa62668830 __libc_start_main
/build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
#15 0x0000000000749e49 (opt+0x749e49)
Stack dump:
0. Program arguments: opt -sroa -adce -lcssa -indvars -o small-opt.bc
small.bc
1. Running pass 'Function Pass Manager' on module 'small.bc'.
2. Running pass 'Canonicalize natural loops' on function '@f'
Aborted (core dumped)
$
------------------------------
int a, c, d;
void e (int b) {}
void f ()
{
int g = 4;
while (0)
g = 0;
while (0)
{
int h;
c && 6;
if (h)
continue;
}
while (0)
a || 0;
for (; 0; d)
{
e (g);
while (1)
{
int i;
if (f)
continue;
}
}
}
int main ()
{
f ();
return 0;
}</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>