https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115994
--- Comment #1 from Hongtao Liu <liuhongt at gcc dot gnu.org> --- Also in vect_recog_sat_trunc_pattern 4700 tree v_itype = get_vectype_for_scalar_type (vinfo, itype); 4701 tree v_otype = get_vectype_for_scalar_type (vinfo, otype); 4702 internal_fn fn = IFN_SAT_TRUNC; 4703 4704 if (v_itype != NULL_TREE && v_otype != NULL_TREE 4705 && direct_internal_fn_supported_p (fn, tree_pair (v_otype, v_itype), 4706 OPTIMIZE_FOR_BOTH)) 4707 { 4708 gcall *call = gimple_build_call_internal (fn, 1, ops[0]); 4709 tree out_ssa = vect_recog_temp_ssa_var (otype, NULL); it's supposed to check for something like sstruncv8siv8hi2, but it actually checks for sstruncv8siv16hi2 since get_vectype_for_scalar_type return same-size vector type not same-nunit vector type.