https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127073

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|127013                      |

--- Comment #4 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Conceptually I think this needs to be cleaned up in the gimple optimizers,
probably VRP or CCP.  But I don't think Ranger has the concept of "A and B have
no bits in common" which is the key to being able to recognize that all three
forms are equivalent.  Post-VRP the unreachables are gone and we lose that
information.

Rogers aop optab may help here too since it's expressing that we can use an ADD
or an IOR for certain operations.  We probably want to steer towards ADD,
knowing that there will likely be some cases that are better with IOR that
we'll just have to live with.

Note that we need that work to eliminate the trailing AND as well.  It's the
disjoint nature of the bits in X and Y that enable removing that trailing AND
because we know there's no carry-out from the arithmetic.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127013
[Bug 127013] Missed LLVM's or disjoint detection for targets

Reply via email to