This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] Fix PR54733 Optimize endian independent load/store
- From: "Thomas Preud'homme" <thomas dot preudhomme at arm dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 20 May 2014 18:29:01 +0800
- Subject: RE: [PATCH] Fix PR54733 Optimize endian independent load/store
- Authentication-results: sourceware.org; auth=none
- References: <006f01cf6b71$1cf10df0$56d329d0$ at arm dot com> <000001cf70ee$9aa2ed90$cfe8c8b0$ at arm dot com> <CAFiYyc1-5KbvVXqiQKu3aVn_X0RKvvtJn4hBtADp5eA3QFEb4A at mail dot gmail dot com> <EF3B84D2-BB18-405B-8CE3-3C1F2A792473 at gmail dot com> <CAFiYyc360hKJvypP+qDwWF-7JM8dVj-gsVpnwGFMgNYo=taqMQ at mail dot gmail dot com> <000801cf73d5$be55b530$3b011f90$ at arm dot com> <CAFiYyc1pwPGtNb-WUVtyvO+gTn+HvDrMY-cn1+7BGGv=inb0kw at mail dot gmail dot com>
> From: Richard Biener [mailto:richard.guenther@gmail.com]
>
> It may do three aligned loads, char, short, char and combine them
> while doing an unaligned int load may end up being slower. Though
> very probable the RTL expansion machinery for unaligned loads
> is way more clever to emit an optimal sequence than a programmer is.
That's what I meant. I expect the RTL machinery to emit the optimal sequence
to do an unaligned load. If it doesn't, it should probably be fixed.
>
> Anyway, as said before please consider addressing any cost issues
> as followup - just make sure to properly emit unaligned loads via
> a sequence I suggested.
That's what I did with the addition of skipping the optimization for target
with slow unaligned access for bswap permutation. Since this affects ARM
you can be sure I'll follow up on the cost model. I already started thinking
about it.
I'll send the new patch as soon as all the tests are done.
Best regards,
Thomas