https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95839
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- OK, with some pending patch applied and diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index ca6bedc9cc8..3d5de39383c 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -3130,7 +3130,7 @@ vect_slp_analyze_bb_1 (bb_vec_info bb_vinfo, int n_stmts, bool &fatal) return false; } - if (BB_VINFO_DATAREFS (bb_vinfo).length () < 2) + if (0 && BB_VINFO_DATAREFS (bb_vinfo).length () < 2) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, this only fails to vectorize due to cost considerations (considering to code-generate as I wrote): 0x53b15a0 _1 + _2 1 times vector_stmt costs 12 in body 0x53b15a0 <unknown> 1 times vec_construct costs 8 in prologue 0x53b15a0 <unknown> 1 times vec_construct costs 8 in prologue 0x5412d10 _1 + _2 1 times scalar_stmt costs 12 in body 0x5412d10 _4 + _5 1 times scalar_stmt costs 12 in body but with -fno-vect-cost-model it "works" as I guessed. For division we correctly do not vectorize.