> From: Richard Henderson [mailto:r...@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