https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89536
--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > I wonder if we shouldn't do: > --- gcc/tree-ssa-dom.c.jj 2019-02-26 14:13:08.296824100 +0100 > +++ gcc/tree-ssa-dom.c 2019-02-28 15:46:52.285495060 +0100 > @@ -346,6 +346,9 @@ edge_info::derive_equivalences (tree nam > boolean types with precision > 1. */ > if (code == BIT_NOT_EXPR > && TREE_CODE (rhs) == SSA_NAME > + && (TREE_CODE (TREE_TYPE (rhs)) == BOOLEAN_TYPE > + || (INTEGRAL_TYPE_P (TREE_TYPE (rhs)) > + && TYPE_PRECISION (TREE_TYPE (rhs)) == 1)) > && ssa_name_has_boolean_range (rhs)) > { > if (integer_zerop (value)) > > because while ssa_name_has_boolean_range returns true for both the case > where the type is BOOLEAN_TYPE and where the type is integral with precision > 1 (and unsigned), we do not want to do this if the type has larger precision > and just the value has [0, 1] value range. > Perhaps we just should do the checks and not call ssa_name_has_boolean_range > here. There is very likely the same issue in the BIT_AND_EXPR case then.