<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 -indvars -loop-load-elim fails with old PM"
href="https://bugs.llvm.org/show_bug.cgi?id=49141">49141</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>opt -indvars -loop-load-elim fails with old PM
</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>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>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mikael.holmen@ericsson.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=24513" name="attach_24513" title="bbi-52668.ll reproducer">attachment 24513</a> <a href="attachment.cgi?id=24513&action=edit" title="bbi-52668.ll reproducer">[details]</a></span>
bbi-52668.ll reproducer
Reproduce with
opt -enable-new-pm=0 -S -o /dev/null bbi-52668.ll -indvars -loop-load-elim
Result
opt: ../include/llvm/IR/ValueHandle.h:490: ValueTy
*llvm::PoisoningVH<llvm::BasicBlock>::getValPtr() const [ValueTy =
llvm::BasicBlock]: Assertion `!Poisoned && "Accessed a poisoned value handle!"'
failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
This starts happening with commit 664e1da485d2:
[LoopLoadElim] Make sure all loops are in simplify form. PR48150
LoopLoadElim may end up expanding an AddRec from a loop
which is not the current loop. This loop may not be in simplify
form. We figure it out after the no-return point, so cannot bail
in this case.
AddRec requires simplify form to expand. The only way to ensure
this does not crash is to simplify all loops beforehand.
The issue only exists in new PM. Old PM requests LoopSimplify
required pass and it simplifies all loops before the opt begins.
Differential Revision: <a href="https://reviews.llvm.org/D91525">https://reviews.llvm.org/D91525</a>
Reviewed By: asbirlea, aeubanks</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>