[Bug tree-optimization/96779] Failure to optimize comparison of negative version of self
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jul 23 04:02:51 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96779
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Keywords| |easyhack
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is simple, I will take.
(for cmp (eq ne)
(simplify
(cmp:c @0 (negate @0))
(if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0)))
(cmp:c @0 { build_zero_cst (TREE_TYPE(@0)); })))))
Should be enough.
More information about the Gcc-bugs
mailing list