https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82190

acsawdey at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |acsawdey at gcc dot 
gnu.org

--- Comment #2 from acsawdey at gcc dot gnu.org ---
So, I think I have figured this one out. Seems to be an alias analysis problem
caused by my memcmp expansion code setting the size of the mem access to only
the bytes used by the comparison.

So the first memcmp of 6 bytes does two doubleword (8 byte) loads but sets the
size to 6 bytes.

The second memcpy of 7 bytes writes one byte past that.

The alias analysis doesn't see a conflict between the write of the 7th byte and
the earlier load, so it gets rid of the 8 byte load done by the second memcmp
and uses the data from the earlier one.

I'll have a patch for this posted shortly.

Reply via email to