https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98550
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org CC| |rsandifo at gcc dot gnu.org --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- So it changes the type from NULL to v4si and the conversion node is t.ii:87:6: note: node 0x30b4080 (max_nunits=4, refcnt=1) t.ii:87:6: note: op template: patt_41 = (long int) _10; t.ii:87:6: note: stmt 0 patt_41 = (long int) _10; t.ii:87:6: note: stmt 1 patt_47 = (long int) _10; t.ii:87:6: note: stmt 2 patt_53 = (long int) _10; t.ii:87:6: note: stmt 3 patt_18 = (long int) _10; t.ii:87:6: note: children 0x30b4100 $15 = void already anticipating max_nunits == 4. The problematic node is t.ii:87:6: note: node 0x30b3d80 (max_nunits=4, refcnt=1) t.ii:87:6: note: op template: patt_41 = (long int) _10; t.ii:87:6: note: stmt 0 patt_41 = (long int) _10; t.ii:87:6: note: stmt 1 patt_47 = (long int) _10; t.ii:87:6: note: stmt 2 patt_53 = (long int) _10; t.ii:87:6: note: stmt 3 patt_18 = (long int) _10; t.ii:87:6: note: stmt 4 patt_23 = (long int) _10; t.ii:87:6: note: stmt 5 patt_27 = (long int) _10; t.ii:87:6: note: children 0x30b3e00 where the issue is that we fail to reject this for BB vectorization because it would need unrolling. Looks like the test in vect_record_max_nunits isn't catching this case: /* If populating the vector type requires unrolling then fail before adjusting *max_nunits for basic-block vectorization. */ poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (vectype); unsigned HOST_WIDE_INT const_nunits; if (is_a <bb_vec_info> (vinfo) && (!nunits.is_constant (&const_nunits) || const_nunits > group_size)) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "Build SLP failed: unrolling required " "in basic block SLP\n"); /* Fatal mismatch. */ return false; } I guess it should be a !multiple_p (group_size, nunits) check instead?