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

--- Comment #4 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> tree_nop_conversion_p certainly doesn't imply the two types are compatible
> types.
> So, I think we should go with
> --- gcc/match.pd.jj   2025-03-13 14:05:09.689017389 +0100
> +++ gcc/match.pd      2025-03-14 12:13:02.563169756 +0100
> @@ -5284,7 +5284,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
>        || tree_int_cst_sgn (@2) >= 0)
>       && wi::to_wide (@3) == wi::set_bit_in_zero (shift, prec))
>      (with { auto mask = wide_int::from (wi::to_wide (@2), prec, UNSIGNED); }
> -     (bit_and @0 { wide_int_to_tree (type, mask << shift); }))))))
> +     (bit_and (convert @0) { wide_int_to_tree (type, mask << shift); }))))))
Oops, yes, forgot to add the convert.  Are you going to go with
that patch, or should I?

Reply via email to