https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103761
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rsandifo at gcc dot gnu.org --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed btw, #1 0x0000000000f8b9b2 in exact_div<2u, unsigned long, unsigned long> (a=..., b=...) at /home/rguenther/src/trunk/gcc/poly-int.h:2239 2239 gcc_checking_assert (a.coeffs[0] % b.coeffs[0] == 0); (gdb) p a $3 = (const poly_int_pod<2, unsigned long> &) @0x7fffffffada0: {coeffs = {4, 4}} (gdb) p b $4 = (const poly_int_pod<2, unsigned long> &) @0x3862a00: {coeffs = {8, 8}} 8916 if (loop_vinfo 8917 && LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo)) 8918 check_load_store_for_partial_vectors (loop_vinfo, vectype, VLS_LOAD, 8919 group_size, memory_access_type, 8920 ncopies, &gs_info, mask); passes down ncopies == 1 but with SLP this is always one. From what vect_record_loop_mask does it looks like it would do OK with just SLP_TREE_NUMBER_OF_VEC_STMTS. The following works for the testcase but the APIs are somewhat iffy (I guess I need to think on how to merge the SLP vs. non-SLP idea of "ncopies"). Richard, can you take over from this? Test coverage on x86-64 is zero here. diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 5c9e8cfefa5..3304df26842 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -8917,7 +8917,10 @@ vectorizable_load (vec_info *vinfo, && LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo)) check_load_store_for_partial_vectors (loop_vinfo, vectype, VLS_LOAD, group_size, memory_access_type, - ncopies, &gs_info, mask); + slp_node + ? SLP_TREE_NUMBER_OF_VEC_STMTS + (slp_node) : ncopies, + &gs_info, mask); if (dump_enabled_p () && memory_access_type != VMAT_ELEMENTWISE