[LLVMbugs] [Bug 18165] wrong code at -Os and above

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 26 08:57:05 PST 2014


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

Andrew Trick <atrick at apple.com> changed:

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

--- Comment #4 from Andrew Trick <atrick at apple.com> ---
mzolotukhin at apple.com says:

when LSR replaces uses of one IV with the other, it needs to adjust the
corresponding offsets. Adjusting here means multiplication by the strides ratio
(factor). In the test we had one IV of type i8, its offset was 128, and the
factor for this IV and the base IV was 2. LSR got the adjusted offset of
128*2=256 which later was truncated to i8, resulting in incorrect comparison
result.

Committed r202273
    M    lib/Transforms/Scalar/LoopStrengthReduce.cpp
    A    test/Transforms/LoopStrengthReduce/pr18165.ll

-- 
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/20140226/95fc47de/attachment.html>


More information about the llvm-bugs mailing list