https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102872
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I wonder if we should just do this:
(for neeq (ne eq)
(simplify
(neeq (convert:s @0) integer_zerop@1)
(with
{
tree inside_type = TREE_TYPE (@0);
tree outer_type = TREE_TYPE (@1);
}
(if (TYPE_PRECISION (inside_type) > TYPE_PRECISION (outer_type))
(neeq (bit_and @0
{ wide_int_to_tree (type0,
wi::mask (TYPE_PRECISION (inside_type),
false,
TYPE_PRECISION (outer_type))); })
{ build_zero_cst (inside_type); })))))
)
Or does the bit_and to a convert make better sense? I don't care either way
really but it would be a good idea to chose one or the other really.