[Bug tree-optimization/112093] (X & Y) < X (unsigned) and (X & Y) != X should produce the same code
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Nov 4 21:10:35 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112093
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2023-11-04
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(for cmp (lt ge le gt )
bop (bit_and bit_and bit_ior bit_ior)
rcmp (ne eq eq ne )
(simplify
(cmp (bop@2 @0 @1) @0)
(if (tree_expr_nonnegative_p (@0)
&& (bop == BIT_AND
|| tree_expr_nonnegative_p (@1)))
(rcmp @2 @0))))
I have not looked into what is needed for the IOR case for
!tree_expr_nonnegative_p (@1) yet but I suspect it is similar to what I did for
PR 101590.
Anyways mine.
More information about the Gcc-bugs
mailing list