https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83940
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unknown |8.0 --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- This looks broken already in 7.x: enum vect_def_type scatter_src_dt = vect_unknown_def_type; and scatter_src_dt never modified, and just used in 2 spots: src = vec_oprnd1 = vect_get_vec_def_for_stmt_copy (scatter_src_dt, vec_oprnd1); and src = vec_oprnd1 = vect_get_vec_def_for_stmt_copy (scatter_src_dt, vec_oprnd1); Given the earlier: src = vec_oprnd1 = vect_get_vec_def_for_operand (gimple_assign_rhs1 (stmt), stmt); and op = gimple_assign_rhs1 (stmt); ... if (!vect_is_simple_use (op, vinfo, &def_stmt, &dt, &rhs_vectype)) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "use not simple.\n"); return false; } I would have logically expected it should use dt rather than scatter_src_dt.