[LLVMbugs] [Bug 9561] Store incorrectly eliminated

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 29 15:14:17 PDT 2011


David Terei <davidterei at gmail.com> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #10 from David Terei <davidterei at gmail.com> 2011-03-29 17:14:17 CDT ---
Unfortunately the fix applied in revision 128319 has a bug in it. It does a
comparison between two pointers that have the same base pointer involving each
pointers offset and size from the base pointer:

(EarlierOff + Earlier.Size) <= (LaterOff + Later.Size)

This is correct but EarlierOff is a signed integer while Earlier.Size is
unsigned. So you don't get the right result.

I've attached a patch which doesn't change the logic of the code, just does the
comparison above differently so that the signed integer components are done
first and converted to unsigned equivalents to do the final comparison. This
fixes the bug for me.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list