https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127073
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at gcc dot gnu.org
--- Comment #3 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Note that all else being equal we generally prefer "add" over "ior/xor" when
the bits are disjoint. "add" has a higher chance of compressing as the
compressed forms allow more register choices. "add" also has the potential to
combine with a shift generating shNadd sequences.
On the other hand the logical forms have the opportunity to combine with
bit-not operations.
Point being there's multiple axis to consider here.