<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 crash with "-sroa -jump-threading -lcssa -licm": LLVM ERROR: Broken function found, compilation aborted!"
href="https://bugs.llvm.org/show_bug.cgi?id=49013">49013</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>opt crash with "-sroa -jump-threading -lcssa -licm": LLVM ERROR: Broken function found, compilation aborted!
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>suochenyao@163.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=24476" name="attach_24476" title="IR that is passed to opt">attachment 24476</a> <a href="attachment.cgi?id=24476&action=edit" title="IR that is passed to opt">[details]</a></span>
IR that is passed to opt
*******************************************************************************
OS and Platform:
CentOS Linux release 7.8.2003 (Core), x86_64 GNU/Linux
*******************************************************************************
Program:
short a;
long b;
int c;
void d() {
e:
for (;;) {
long f = 1;
if (~f) {
int g, h, j;
int i[8] = {4};
int *k[7][5] = {&h, &j, &g};
long l[5];
for (; 5;)
l[c];
for (; b;)
for (; a; a)
goto e;
}
}
}
int main() {}
*******************************************************************************
clang version:
clang version 10.0.0 (/home/suocy/src/llvm-dev/llvm/tools/clang
65acf43270ea2894dffa0d0b292b92402f80c8cb) (/home/suocy/src/llvm-dev/llvm
2c4ca6832fa6b306ee6a7010bfb80a3f2596f824)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/suocy/bin/llvm-dev/bin
Found candidate GCC installation:
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
Selected GCC installation:
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
*******************************************************************************
Command Lines:
$ clang -O3 -mllvm -disable-llvm-optzns -c -emit-llvm a.c -o a.bc
a.c:14:12: warning: expression result unused [-Wunused-value]
l[c];
~ ~^
a.c:16:19: warning: expression result unused [-Wunused-value]
for (; a; a)
^
2 warnings generated.
$ opt -sroa -jump-threading -lcssa -licm a.bc -o a.opt.bc
PHI nodes must have at least one entry. If the block is dead, the PHI should
be removed!
%k.sroa.0.3 = phi i32*
in function d
LLVM ERROR: Broken function found, compilation aborted!</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>