[Bug tree-optimization/104267] [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7144 since r12-5613-g32ede1083fad4b68
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104267 Martin Liška changed: What|Removed |Added Target Milestone|--- |12.0 Last reconfirmed||2022-01-28 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Priority|P3 |P1
[Bug tree-optimization/104267] [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7144 since r12-5613-g32ede1083fad4b68
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104267 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #1 from Richard Biener --- I will have a look.
[Bug tree-optimization/104267] [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7144 since r12-5613-g32ede1083fad4b68
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104267 --- Comment #2 from Richard Biener --- pr91003.f90:8:13: note: -->vectorizing SLP node starting from: _61 = .COND_MUL (_202, j_42(D), bnrm2_60(D), 0.0); pr91003.f90:8:13: missed: could not find an appropriate vector mask type. pr91003.f90:8:13: note: -->vectorizing SLP node starting from: M.6_62 = .COND_MAX (_202, _36, _61, 0.0); I can't find where we actually verify we can use .COND_MUL for this node. Huh. Note it's pr91003.f90:8:13: note: node 0x426e8c8 (max_nunits=16, refcnt=1) pr91003.f90:8:13: note: op template: _61 = .COND_MUL (_202, j_42(D), bnrm2_60(D), 0.0); pr91003.f90:8:13: note: stmt 0 _61 = .COND_MUL (_202, j_42(D), bnrm2_60(D), 0.0); pr91003.f90:8:13: note: stmt 1 _61 = .COND_MUL (_202, j_42(D), bnrm2_60(D), 0.0); pr91003.f90:8:13: note: children 0x426e950 0x426e9d8 0x426ea60 0x426eae8 pr91003.f90:8:13: note: node (external) 0x426e950 (max_nunits=1, refcnt=1) pr91003.f90:8:13: note: { _202, _202 } pr91003.f90:8:13: note: node (external) 0x426e9d8 (max_nunits=1, refcnt=1) pr91003.f90:8:13: note: { j_42(D), j_42(D) } pr91003.f90:8:13: note: node (external) 0x426ea60 (max_nunits=1, refcnt=1) pr91003.f90:8:13: note: { bnrm2_60(D), bnrm2_60(D) } pr91003.f90:8:13: note: node (constant) 0x426eae8 (max_nunits=1, refcnt=1) pr91003.f90:8:13: note: { 0.0, 0.0 } so _all_ childs are external/constant. I think the issue here is that we pushed vector(16) real(kind=4) as vector type for this external def but we are expecting a VECTOR_BOOLEAN_TYPE_P here. diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 824ebb6354b..000a0f4b47e 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -3444,7 +3444,9 @@ vectorizable_call (vec_info *vinfo, { if (slp_node) for (i = 0; i < nargs; ++i) - if (!vect_maybe_update_slp_op_vectype (slp_op[i], vectype_in)) + if (!vect_maybe_update_slp_op_vectype (slp_op[i], +vectypes[i] +? vectypes[i] : vectype_in)) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, fixes this.
[Bug tree-optimization/104267] [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7144 since r12-5613-g32ede1083fad4b68
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104267 --- Comment #3 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:9ec306582fd60e5b76f07eb81c9ed2415d9a3590 commit r12-6918-g9ec306582fd60e5b76f07eb81c9ed2415d9a3590 Author: Richard Biener Date: Fri Jan 28 11:32:11 2022 +0100 tree-optimization/104267 - fix external def vector type for call args The following fixes the vector type registered for external defs in call arguments when vectorizing with SLP. We assumed uniform vectype_in types here but with calls like .COND_MUL we also have mask arguments which, when invariant or external, need to have a proper mask vector type. 2022-01-28 Richard Biener PR tree-optimization/104267 * tree-vect-stmts.cc (vectorizable_call): Properly use the per-argument determined vector type for externals and invariants.
[Bug tree-optimization/104267] [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7144 since r12-5613-g32ede1083fad4b68
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104267 Richard Biener changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #4 from Richard Biener --- Fixed.