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

Roger Sayle <roger at nextmovesoftware dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at nextmovesoftware dot 
com

--- Comment #11 from Roger Sayle <roger at nextmovesoftware dot com> ---
Hi Jakub,
Sorry for the inconvenience.
I've just come up with a near-identical fix.  I think it's safe to strip the
(symmetric) bswaps in the first transformation, but I'm now paranoid enough to
explicitly convert both operands of the cmp to the same comparison type in the
second transformation.
-   (cmp (bswap @0) INTEGER_CST@1)
-   (cmp @0 (bswap @1))))
+   (cmp (bswap@0 @1) INTEGER_CST@2)
+   (with { tree t = TREE_TYPE(@0); }
+    (cmp (convert:t @1) (convert:t (bswap @2))))))

Reply via email to