<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 "-mem2reg -simplifycfg -instcombine -jump-threading -correlated-propagation -lcssa -loop-rotate -loop-vectorize": Assertion `!verifyFunction(*L->getHeader()->getParent(), &dbgs())' failed."
href="https://bugs.llvm.org/show_bug.cgi?id=48296">48296</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>opt crash with "-mem2reg -simplifycfg -instcombine -jump-threading -correlated-propagation -lcssa -loop-rotate -loop-vectorize": Assertion `!verifyFunction(*L->getHeader()->getParent(), &dbgs())' failed.
</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=24211" name="attach_24211" title="bc file about this bug">attachment 24211</a> <a href="attachment.cgi?id=24211&action=edit" title="bc file about this bug">[details]</a></span>
bc file about this bug
*******************************************************************************
OS and Platform:
CentOS Linux release 7.8.2003 (Core), x86_64 GNU/Linux
*******************************************************************************
Program:
int a, b, c;
char d, e;
int f[10];
static int(g)() { return 0; }
char h() {
for (;; a) {
int i = 0;
for (; i; i++)
f[i] = 9;
if (g()) {
long j=0;
for (;; d) {
int k=0;
{
short l=0;
if (c)
break;
}
if (e & 0)
return b;
}
}
}
}
int main() {}
*******************************************************************************
clang version:
$ clang --version
clang version 12.0.0 (/home/suocy/src/llvm-dev/llvm-project/llvm/tools/clang
abbf4802bb4fb519dce436ba16d90c3eeb1135b1)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/suocy/bin/llvm-dev/bin
*******************************************************************************
Command Lines:
$ clang -O3 -mllvm -disable-llvm-optzns -c -emit-llvm a.c -o a.bc
a.c:6:11: warning: expression result unused [-Wunused-value]
for (;; a) {
^
a.c:12:15: warning: expression result unused [-Wunused-value]
for (;; d) {
^
2 warnings generated.
$ opt -mem2reg -simplifycfg -instcombine -jump-threading
-correlated-propagation -lcssa -loop-rotate -loop-vectorize a.bc -o a.opt.bc
PHI nodes must have at least one entry. If the block is dead, the PHI should
be removed!
%cleanup.dest.slot.3 = phi i32
opt:
/home/suocy/src/llvm-dev/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8623:
bool llvm::LoopVectorizePass::processLoop(llvm::Loop*): Assertion
`!verifyFunction(*L->getHeader()->getParent(), &dbgs())' failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
0. Program arguments: /home/suocy/bin/llvm-dev/bin/opt -mem2reg
-simplifycfg -instcombine -jump-threading -correlated-propagation -lcssa
-loop-rotate -loop-vectorize a.bc -o a.opt.bc
1. Running pass 'Function Pass Manager' on module 'a.bc'.
2. Running pass 'Loop Vectorization' on function '@h'
#0 0x0000000002a7842c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/home/suocy/bin/llvm-dev/bin/opt+0x2a7842c)
#1 0x0000000002a762a4 llvm::sys::RunSignalHandlers()
(/home/suocy/bin/llvm-dev/bin/opt+0x2a762a4)
#2 0x0000000002a76403 SignalHandler(int)
(/home/suocy/bin/llvm-dev/bin/opt+0x2a76403)
#3 0x00007f5abdab9630 __restore_rt (/lib64/libpthread.so.0+0xf630)
#4 0x00007f5abc6a7387 raise (/lib64/libc.so.6+0x36387)
#5 0x00007f5abc6a8a78 abort (/lib64/libc.so.6+0x37a78)
#6 0x00007f5abc6a01a6 __assert_fail_base (/lib64/libc.so.6+0x2f1a6)
#7 0x00007f5abc6a0252 (/lib64/libc.so.6+0x2f252)
#8 0x0000000002c5291f llvm::LoopVectorizePass::processLoop(llvm::Loop*)
(/home/suocy/bin/llvm-dev/bin/opt+0x2c5291f)
#9 0x0000000002c53ab9 llvm::LoopVectorizePass::runImpl(llvm::Function&,
llvm::ScalarEvolution&, llvm::LoopInfo&, llvm::TargetTransformInfo&,
llvm::DominatorTree&, llvm::BlockFrequencyInfo&, llvm::TargetLibraryInfo*,
llvm::DemandedBits&, llvm::AAResults&, llvm::AssumptionCache&,
std::function<llvm::LoopAccessInfo const& (llvm::Loop&)>&,
llvm::OptimizationRemarkEmitter&, llvm::ProfileSummaryInfo*)
(/home/suocy/bin/llvm-dev/bin/opt+0x2c53ab9)
#10 0x0000000002c54354 (anonymous
namespace)::LoopVectorize::runOnFunction(llvm::Function&)
(/home/suocy/bin/llvm-dev/bin/opt+0x2c54354)
#11 0x00000000022b7d38 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/suocy/bin/llvm-dev/bin/opt+0x22b7d38)
#12 0x00000000022b87d9 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/suocy/bin/llvm-dev/bin/opt+0x22b87d9)
#13 0x00000000022b75e3 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/suocy/bin/llvm-dev/bin/opt+0x22b75e3)
#14 0x000000000072ba1b main (/home/suocy/bin/llvm-dev/bin/opt+0x72ba1b)
#15 0x00007f5abc693555 __libc_start_main (/lib64/libc.so.6+0x22555)
#16 0x00000000007dcc45 _start (/home/suocy/bin/llvm-dev/bin/opt+0x7dcc45)
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>