https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117012
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Roger Sayle from comment #4) > The patch for PR target/114428 incorrectly uses CONST_VECTOR_DUPLICATE_P, > which has slightly different semantics to what the author intended. Instead > the function const_vec_duplicate_p should be used [which additionally checks > that CONST_VECTOR_NPATTERNS (x) == 1]. Just a quick audit of the uses of CONST_VECTOR_DUPLICATE_P: the use in simplify_const_unary_operation looks ok because it uses CONST_VECTOR_NPATTERNS . The use in simplify_const_binary_operation looks ok for the same reason. print_rtx_operand_codes_E_and_V is fine too may_trap_p_1 looks ok too because it uses CONST_VECTOR_ENCODED_ELT to check to see if any of the patterns were 0 or not (for the VLA case) It is just the use added by r15-104 which looks broken.