https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94727
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Richard Biener from comment #2) > test() is basic-block vectorized on the c-loop body which has the d- and > e-loops > completely unrolled. We create some weird > > mask__84.17_18 = vect_cst__94 < vect_cst__20; > vect_patt_266.18_6 = VEC_COND_EXPR <mask__84.17_18, vect_cst__16, > vect_cst__15>; > > where vect_cst__94 and vect_cst__20 look like > > { var_3.1_42 ? -1 : 0, var_3.1_42 ? -1 : 0, ... > > or even > > { _272 ? -1 : 0, ... > > with > > _272 = _271 < var_11.0_40 > > so the vectorization is quite imperfect, mainly due to > > t1.C:9:32: note: ==> examining statement: _85 = var_11.0_40 > _86; > t1.C:12:69: missed: not vectorized: relevant stmt not supported: _85 = > var_11.0_40 > _86; > t1.C:9:32: note: Building vector operands from scalars instead > > that doesn't yet explain what goes wrong here. If you change the e loop iteration to stop at e < 16 the testcase is not miscompiled, so somehow the t1.C:9:20: missed: Build SLP failed: incompatible vector types for: arr_42[a_26][0][c_11][0][16] = _44; t1.C:9:20: note: old vector type: vector(2) long long int t1.C:9:20: note: new vector type: vector(1) long long int might be a relevant factor. Leaving to Richard.