[llvm-bugs] [Bug 44605] New: [SCEV] ScalarEvolution may generate wrong result for PHI depending on another PHI
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jan 21 05:11:38 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=44605
Bug ID: 44605
Summary: [SCEV] ScalarEvolution may generate wrong result for
PHI depending on another PHI
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Global Analyses
Assignee: unassignedbugs at nondot.org
Reporter: dantrushin at gmail.com
CC: llvm-bugs at lists.llvm.org
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)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200121/33ae27be/attachment.html>
More information about the llvm-bugs
mailing list