This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: builtin_bswap plus enhancements
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: falk at debian dot org (Falk Hueffner)
- Cc: clattner at apple dot com (Chris Lattner), echristo at apple dot com (Eric Christopher), gcc-patches at gcc dot gnu dot org (gcc-patches at gcc dot gnu dot org Patches), paul at codesourcery dot com, iant at google dot com
- Date: Thu, 10 Aug 2006 16:07:19 -0400 (EDT)
- Subject: Re: builtin_bswap plus enhancements
>
> Chris Lattner <clattner@apple.com> writes:
>
> > Why not add bswap16 as well?
>
> It should be unnecessary, since any attempt to express it should be
> picked up by the rot idiom recognizer, and the backends should then
> emit optimal code for constant-8 rots (and if that doesn't actually
> happen, we should rather fix that).
The other reason to add it is that some targets (PPC) actually have
an instruction which loads byte reversed half word (16bits) from memory.
-- Pinski