https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121682
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2025-12-08
Status|UNCONFIRMED |NEW
--- Comment #2 from Jeffrey A. Law <law at gcc dot gnu.org> ---
While they may all be equivalent, there's no meaningful difference in how the
code we generate for them behaves from a performance standpoint, at least with
the "b" extensions enabled. One use a sub, the other an xor, the other andn.
But they're all going to behave the same from a performane standpoint.
>From a code size standpoint the "andn" variant is the biggest problem because
there is no compressed variant of that instruction.
Much like the other bug in this general space, there's really not a good way I
see to improve this in RTL. It would need to happen in gimple via a
canonicalization route. Whatever we choose as the canonical form has the
potential to be bad on some platforms and good on others, so it's not trivial
to know what sequence to starget.