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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
  _4 = (int) a_11(D);
  _5 = ~_4;
  _6 = (int) b_10(D);
  _7 = _5 & _6;

(simplify
 (bit_and:c (bit_not zero_one_valued_p@0) zero_one_valued_p@1)
 (bit_and @1 (bit_xor! @0 { build_one_cst (type); } )))

Might be enough.


  _4 = ~_3;
  # RANGE [irange] int [0, 1] MASK 0x1 VALUE 0x0
  _5 = (intD.9) b_8(D);
  # RANGE [irange] int [0, 1] MASK 0x1 VALUE 0x0
  _6 = _4 & _5;
  # RANGE [irange] int [0, 1]
  _15 = _6 ^ 1;

Or even:
(simplify
 (bit_xor (bit_and:c zero_one_valued_p@0 @1) integer_onep@2)
 (bit_or (bit_xor @0 @2) (bit_not! @1)))

Or:
(simplify
 (bit_xor (bit_and:c zero_one_valued_p@0 (bit_not @1)) integer_onep@2)
 (bit_or (bit_xor @0 @2) @1))

All of the above will work just trying to figure out which one would be better
here ...

Reply via email to