<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 - [SCEV] ScalarEvolution may generate wrong result for PHI depending on another PHI"
href="https://bugs.llvm.org/show_bug.cgi?id=44605">44605</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[SCEV] ScalarEvolution may generate wrong result for PHI depending on another PHI
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Global Analyses
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dantrushin@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>IndVarSimplify miscompiles the attached testcase due to ScalarEvolution
computing wrong exit value for PHI node %local_3_4
outer:
%local_6_6 = phi i32 [ 10, %entry ], [ %5, %latch ]
%local_4_5 = phi i32 [ 56587, %entry ], [ %.udiv, %latch ]
%local_3_4 = phi i32 [ 2, %entry ], [ %local_6_6, %latch ]
<snip>
latch:
%.lcssa = phi i32 [ %2, %inner ]
%5 = add nuw nsw i32 %local_6_6, 1
%6 = icmp ugt i32 %local_6_6, 276
br i1 %6, label %return, label %outer
Exit value of %local_3_4 is computed as equal to exit value of %local_6_6,
while in fact it is one less (uses previous value of %local_6_6)</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>