[PATCH] Don't check for optab for 16bit bswap
Thomas Preud'homme
thomas.preudhomme@arm.com
Fri Jan 23 04:10:00 GMT 2015
> From: Richard Henderson [mailto:rth@redhat.com]
> Sent: Friday, January 23, 2015 2:43 AM
> On 01/21/2015 11:52 PM, Richard Biener wrote:
> >
> > I was asking for the generic expander to consider bswapHI. Rotates are
> > certainly more likely to get combined with sth else.
>
> Maybe. Alternately, don't we canonicalize byte-swapping memory ops
> as
>
> (set (reg:HI) (bswap:HI (mem:HI)))
>
> (set (mem:HI) (bswap:HI (reg:HI)))
Given the expmed.c bit I pasted, I'd say that's how it would be canonicalized
in RTL form yes. I think Richard was referring to combination at GIMPLE level
but that expander should expand to bswapHI to not break expectations.
Best regards,
Thomas
More information about the Gcc-patches
mailing list