On 12/24/14 10:05, Segher Boessenkool wrote:
The existing transform

   (and X (ior (not X) Y) -> (and X Y)

has two shortcomings: it only handles identical RTX for X, i.e. registers,
not e.g. subregs of registers; and it only handles the case where the NOT
is the first arm of the IOR (it can be the second arm e.g. if the first
arm is a NOT as well).  Fix both.  This fixes gcc.dg/and-1.c on powerpc64.

Bootstrapped and tested on powerpc64-linux; okay for mainline?


Segher


2014-12-24  Segher Boessenkool  <seg...@kernel.crashing.org>

gcc/
        * simplify-rtx.c (simplify_binary_operation_1): Handle more cases
        for the "(and X (ior (not X) Y) -> (and X Y)" transform.
OK.
jeff

Reply via email to