[Bug c++/106841] [12/13 Regression] ICE in vect_get_vec_defs_for_operand, at tree-vect-stmts.cc:1509 since r12-2733-g31855ba6b16cd138
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 6 08:01:32 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106841
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue seems to be that we get
t.ii:40:17: note: vect_recog_widen_mult_pattern: detected: _56 = _55 * 8;
t.ii:40:17: note: widen_mult pattern recognized: patt_36 = (long unsigned
int) patt_38;
t.ii:40:17: note: extra pattern stmt: patt_38 = _76 w* 8;
...
t.ii:40:17: note: ------>vectorizing statement: _55 = (long unsigned int) _76;
t.ii:40:17: note: ------>vectorizing statement: patt_63 = _76 w* 8;
t.ii:40:17: note: transform statement.
...
t.ii:40:17: note: ------>vectorizing statement: A$z_42 = MEM[(const struct R3
&)_57].z;
t.ii:40:17: note: multiple-types.
t.ii:40:17: note: transform statement.
t.ii:40:17: note: vect_is_simple_use: operand (long unsigned int) _76, type of
def: internal
t.ii:40:17: note: vect_is_simple_use: vectype vector(2) long unsigned int
t.ii:40:17: note: transform load. ncopies = 2
t.ii:40:17: note: vect_get_vec_defs_for_operand: _55
and a SLP tree that seems to run into a bug with hybrid discovery:
t.ii:40:17: note: node 0x654a7d8 (max_nunits=4, refcnt=2) vector(4) int
t.ii:40:17: note: op template: _76 = (int) _75;
t.ii:40:17: note: stmt 0 _76 = (int) _75;
t.ii:40:17: note: stmt 1 _84 = (int) _83;
t.ii:40:17: note: children 0x654a860
t.ii:40:17: note: Processing hybrid candidate : _55 = (long unsigned int)
_76;
t.ii:40:17: note: Marked SLP consumed stmt pure: _55 = (long unsigned int)
_76;
that is because the use of _55 is
_56 = _55 * 8;
but that is part of a pattern that is PURE_SLP and we fail to see the
direct use in the gather since gather discovery skips this scaling stmt.
We can probably detect this after the fact but the best fix would be to
somehow mark _55 as hybrid, I'll see if I can manage to do that.
More information about the Gcc-bugs
mailing list