https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98065
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I guess the first ICE could be fixed by using just "const_int_operand" through define_mode_iterator for the altivec non-vsx modes in: (define_expand "vec_set<mode>" [(match_operand:VEC_E 0 "vlogical_operand") (match_operand:<VEC_base> 1 "register_operand") (match_operand 2 "reg_or_cint_operand")] "VECTOR_MEM_ALTIVEC_OR_VSX_P (<MODE>mode)" { rs6000_expand_vector_set (operands[0], operands[1], operands[2]); DONE; }) but I could be wrong. I think using FAIL might not work because can_vec_set_var_idx_p decides whether it can do the non-constant vector sets just based on predicates (though store_bit_field_1 has a fallback). But the P9 makes me wonder which modes can actually be used with the variable set. I think you need to add full testsuite coverage for all the modes and test in all the different ISA settings the expanders care about here.