https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92655
--- Comment #3 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- Maybe we could check in vect_determine_min_output_precision_1 whether the result is used as a shift amount, and if so do: precision = MAX (precision, use_stmt_info->min_output_precision);