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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---

Oh simple way to solve this to convert:
  t2_7 = (unsigned int) t_4;
  _1 = t1_6 | t2_7;
  t_8 = _1 != 0;

Into:
  t3_8 = t1_7 != 0;
  _1 = t_5 | t3_8;

Which is smaller even.

(for bit_op (bit_ior bit_and bit_xor)
 (simplify
  (ne (bit_op (convert @0) @1) integer_zerop@2)
   (if (TREE_CODE (TREE_TYPE (@0)) == BOOLEAN_TYPE
        && types_match (type, @0))
    (bit_op @0 (ne @1 @2))))

Reply via email to