On 12/29/2014 06:04 AM, Thomas Preud'homme wrote: > Since 16bit byteswap can be done via an 8 bit rotation (and it is the > canonical form), > the check for an optab only serves to prevent the bswap optimization for > targets that don't have a 16bit byteswap (but do have a rotation > instruction). See > PR63259 (comments 6 and onwards) for more details.
I question the choice to have rotate be the canonical form. Doesn't this make things more complicated for targets that don't have rotate? Or, equivalently, no 16-bit rotate? That would seem to cover 99% of all 32-bit risc machines. r~