This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/59990] [4.7/4.8/4.9 regression] incorrect memcpy optimization
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 30 Jan 2014 17:38:49 +0000
- Subject: [Bug middle-end/59990] [4.7/4.8/4.9 regression] incorrect memcpy optimization
- Auto-submitted: auto-generated
- References: <bug-59990-4 at http dot gcc dot gnu dot org/bugzilla/>
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.