https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127292
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot
gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2026-09-09
Status|UNCONFIRMED |ASSIGNED
--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
The general rule here for
(a CMP CST) != a
(a CMP CST) ? 1 != a : 0 != a
So
(simplify
(cmp1:c @0 (convert (cmp2@2 @0 CST@1)))
(convert (cond! @2 (cmp1 @0 {one;}) (cmp1 @ {zero;})))
The problem here is we don't have comparisons combiners for cond here.
So we need to expansion of `a ? b : c` into `(a & b) | (!a & c)` or `(a & b) |
(a < c)`. I am not sure it will always simplify so I will need some `!` on the
bit_and/lt/bit_ior I think.
Let me see what I can do.