[LLVMbugs] [Bug 19659] wrong code at -O3 on x86_64-linux-gnu (affecting all clang versions from 2.9 to trunk)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 23 08:49:32 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19659

Sanjay Patel <spatel+llvm at rotateright.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #5 from Sanjay Patel <spatel+llvm at rotateright.com> ---
Resolving as a duplicate of bug 18223.

The IR going into indvars has:
define i32 @main() #0 {
...
; <label>:3                                       ; preds = %12, %.split.us
  %4 = phi i32 [ 0, %.split.us ], [ %13, %12 ]
  %5 = phi i32 [ 0, %.split.us ], [ %13, %12 ]
  %6 = add i32 %5, -1
  %7 = icmp ult i32 %6, %4

Before r209487, indvars/SCEV transforms the icmp ult:
INDVARS: Eliminated comparison:   %7 = icmp ult i32 %6, %4

because both sides of the icmp are SCEVAddRecExprs, and we incorrectly
determine that the comparison is always false.

After r209487, we don't change the icmp and the output is correct for the
reduced IR test case as well as the original C test case.

*** This bug has been marked as a duplicate of bug 18223 ***

-- 
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/20140523/4e8a3031/attachment.html>


More information about the llvm-bugs mailing list