[Bug tree-optimization/103761] [12 Regression] ICE in exact_div, at poly-int.h:2239 since r12-5612-g10833849b55401a52f2334eb032a70beb688e9fc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103761 rsandifo at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #4 from rsandifo at gcc dot gnu.org --- Fixed.
[Bug tree-optimization/103761] [12 Regression] ICE in exact_div, at poly-int.h:2239 since r12-5612-g10833849b55401a52f2334eb032a70beb688e9fc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103761 --- Comment #3 from CVS Commits --- The trunk branch has been updated by Richard Sandiford : https://gcc.gnu.org/g:d037d9ad323ec9eef3e50c6e2cbc1e31191daa5d commit r12-8016-gd037d9ad323ec9eef3e50c6e2cbc1e31191daa5d Author: Richard Sandiford Date: Wed Apr 6 08:56:07 2022 +0100 vect: Fix mask handling for SLP gathers [PR103761] check_load_store_for_partial_vectors predates the support for SLP gathers and so had a hard-coded assumption that gathers/scatters (and load/stores lanes) would be non-SLP operations. This patch passes down the slp_node so that the routine can work out how many vectors are needed in both the SLP and non-SLP cases. gcc/ PR tree-optimization/103761 * tree-vect-stmts.cc (check_load_store_for_partial_vectors): Replace the ncopies parameter with an slp_node parameter. Calculate the number of vectors based on it and vectype. Rename lambda to group_memory_nvectors. (vectorizable_store, vectorizable_load): Update calls accordingly. gcc/testsuite/ PR tree-optimization/103761 * gcc.dg/vect/pr103761.c: New test. * gcc.target/aarch64/sve/pr103761.c: Likewise.
[Bug tree-optimization/103761] [12 Regression] ICE in exact_div, at poly-int.h:2239 since r12-5612-g10833849b55401a52f2334eb032a70beb688e9fc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103761 Richard Biener 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 --- Confirmed btw, #1 0x00f8b9b2 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> &) @0x7fffada0: {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)) 8918check_load_store_for_partial_vectors (loop_vinfo, vectype, VLS_LOAD, 8919 group_size, memory_access_type, 8920 ncopies, _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, _info, mask); + slp_node + ? SLP_TREE_NUMBER_OF_VEC_STMTS + (slp_node) : ncopies, + _info, mask); if (dump_enabled_p () && memory_access_type != VMAT_ELEMENTWISE
[Bug tree-optimization/103761] [12 Regression] ICE in exact_div, at poly-int.h:2239 since r12-5612-g10833849b55401a52f2334eb032a70beb688e9fc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103761 Richard Biener changed: What|Removed |Added Priority|P3 |P1
[Bug tree-optimization/103761] [12 Regression] ICE in exact_div, at poly-int.h:2239 since r12-5612-g10833849b55401a52f2334eb032a70beb688e9fc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103761 Martin Liška changed: What|Removed |Added Ever confirmed|0 |1 CC||marxin at gcc dot gnu.org Summary|[12 Regression] ICE in |[12 Regression] ICE in |exact_div, at |exact_div, at |poly-int.h:2239 |poly-int.h:2239 since ||r12-5612-g10833849b55401a52 ||f2334eb032a70beb688e9fc Status|UNCONFIRMED |NEW Last reconfirmed||2021-12-20 --- Comment #1 from Martin Liška --- Started with r12-5612-g10833849b55401a52f2334eb032a70beb688e9fc.
[Bug tree-optimization/103761] [12 Regression] ICE in exact_div, at poly-int.h:2239
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103761 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |12.0