[Bug tree-optimization/61559] FAIL: gcc.dg/builtin-bswap-8.c on i686 with -mmovbe

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Sep 4 12:08:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61559

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to rguenther@suse.de from comment #14)
> On Thu, 4 Sep 2014, ubizjak at gmail dot com wrote:
> 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61559
> > 
> > --- Comment #12 from Uroš Bizjak <ubizjak at gmail dot com> ---
> > (In reply to Uroš Bizjak from comment #11)
> > 
> > > This one should be:
> > > 
> > >     (simplify
> > >       (bswap (bitop (bswap @0) (bswap @1)))
> > >       (bitop @0 @1))
> > 
> > Oh, we already have this. Please disregard this message.
> 
> Not sure - we don't exactly have it.  OTOH I think
> that
> 
>     (simplify
>       (bitop (bswap @0) (bswap @1))
>       (bswap (bitop @0 @1)))
> 
> is profitable in most cases (not only when wrapped inside another
> bswap).  Jakubs concern applies though.

My concern has not been backed up by data from any target, and generally I'd
say it should be better if we are able to canonicalize in the middle-end (e.g.
for VN etc.).
The question is if for selected ISAs and if the arguments are all memories e.g.
right before expansion or during expansion or RTL optimizations it might not be
worth to undo that if it proves to be beneficial.


More information about the Gcc-bugs mailing list