[Bug middle-end/59990] [4.7/4.8/4.9 regression] incorrect memcpy optimization

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 30 17:38:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59990

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #9)
> Created attachment 31991 [details]
> patch
> 
> Must resist turning this fn upside down ...
> 
> Anyway, untested patch attached.  We can surely do better selecting a
> type, but IIRC most targets have an integer mode that covers all other
> modes (even vector modes).

Besides the GET_MODE_SIZE -> GET_MODE_BITSIZE fix and handling ENUMERAL_TYPEs
similarly for -fsanitize=enum, do you think you could add the
build_aligned_type call too?  I mean, if say the floating
point/boolean/complex/enum type has certain alignment and the integral type we
are going to use instead has different, it would be better to preserve the
alignment info.



More information about the Gcc-bugs mailing list