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: unassignedb...@nondot.org
Reporter: dantrus...@gmail.com
CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs