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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 34879
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34879&action=edit
gcc5-pr65215.patch

Untested fix.  There are still issues left, e.g. I can't understand the "bswap
&&" part in
      if (bswap
          && align < GET_MODE_ALIGNMENT (TYPE_MODE (load_type))
          && SLOW_UNALIGNED_ACCESS (TYPE_MODE (load_type), align))
        return false;
Don't you use the new MEM_REF even for the !bswap (aka nop) case?  So, I don't
see how it would be safe to generate that.
And the testsuite coverage of this is definitely suboptimal, from endianity
POV, bitfields etc.

Reply via email to