* [Bug tree-optimization/102572] [11/12 Regression] ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835
2021-10-03 3:39 [Bug tree-optimization/102572] New: ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 vsevolod.livinskij at frtk dot ru
@ 2021-10-03 6:24 ` pinskia at gcc dot gnu.org
2021-10-03 6:26 ` pinskia at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-03 6:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102572
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-10-03
Ever confirmed|0 |1
Known to fail| |11.1.0, 11.2.0
Known to work| |10.3.0
Target Milestone|--- |11.3
Summary|ICE for skx in |[11/12 Regression] ICE for
|vect_build_gather_load_call |skx in
|s, at |vect_build_gather_load_call
|tree-vect-stmts.c:2835 |s, at
| |tree-vect-stmts.c:2835
Status|UNCONFIRMED |NEW
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/102572] [11/12 Regression] ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835
2021-10-03 3:39 [Bug tree-optimization/102572] New: ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 vsevolod.livinskij at frtk dot ru
2021-10-03 6:24 ` [Bug tree-optimization/102572] [11/12 Regression] " pinskia at gcc dot gnu.org
@ 2021-10-03 6:26 ` pinskia at gcc dot gnu.org
2021-10-04 7:14 ` [Bug tree-optimization/102572] [11/12 Regression] ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 since r11-3070-g783dc66f9ccb0019 marxin at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-03 6:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102572
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
if (!useless_type_conversion_p (masktype, TREE_TYPE (vec_mask)))
{
poly_uint64 sub1 = TYPE_VECTOR_SUBPARTS (TREE_TYPE
(mask_op));
poly_uint64 sub2 = TYPE_VECTOR_SUBPARTS (masktype);
gcc_assert (known_eq (sub1, sub2));
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/102572] [11/12 Regression] ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 since r11-3070-g783dc66f9ccb0019
2021-10-03 3:39 [Bug tree-optimization/102572] New: ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 vsevolod.livinskij at frtk dot ru
2021-10-03 6:24 ` [Bug tree-optimization/102572] [11/12 Regression] " pinskia at gcc dot gnu.org
2021-10-03 6:26 ` pinskia at gcc dot gnu.org
@ 2021-10-04 7:14 ` marxin at gcc dot gnu.org
2021-10-04 7:16 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-04 7:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102572
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
Summary|[11/12 Regression] ICE for |[11/12 Regression] ICE for
|skx in |skx in
|vect_build_gather_load_call |vect_build_gather_load_call
|s, at |s, at
|tree-vect-stmts.c:2835 |tree-vect-stmts.c:2835
| |since
| |r11-3070-g783dc66f9ccb0019
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r11-3070-g783dc66f9ccb0019.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/102572] [11/12 Regression] ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 since r11-3070-g783dc66f9ccb0019
2021-10-03 3:39 [Bug tree-optimization/102572] New: ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 vsevolod.livinskij at frtk dot ru
` (2 preceding siblings ...)
2021-10-04 7:14 ` [Bug tree-optimization/102572] [11/12 Regression] ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 since r11-3070-g783dc66f9ccb0019 marxin at gcc dot gnu.org
@ 2021-10-04 7:16 ` rguenth at gcc dot gnu.org
2021-10-12 11:39 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-04 7:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102572
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
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> ---
I can take a look.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/102572] [11/12 Regression] ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 since r11-3070-g783dc66f9ccb0019
2021-10-03 3:39 [Bug tree-optimization/102572] New: ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 vsevolod.livinskij at frtk dot ru
` (3 preceding siblings ...)
2021-10-04 7:16 ` rguenth at gcc dot gnu.org
@ 2021-10-12 11:39 ` rguenth at gcc dot gnu.org
2021-10-12 12:50 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-12 11:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102572
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
The to be vectorized IL is
<bb 4> [local count: 118111600]:
# i_21 = PHI <i_18(12), i_14(27)>
_2 = (int) i_21;
_32 = &(*d_16(D))[_2];
_3 = .MASK_LOAD (_32, 32B, h_15(D));
_5 = _3 != 0;
_23 = _5 & h_15(D);
prephitmp_36 = _23 ? 1 : 0;
i.3_6 = (unsigned short) i_21;
_7 = i.3_6 + 1;
i_18 = (short int) _7;
if (i_18 != 0)
goto <bb 12>; [89.00%]
else
goto <bb 10>; [11.00%]
<bb 12> [local count: 105119324]:
goto <bb 4>; [100.00%]
and the issue is that the mask is an invariant but we're just using
vect_get_vec_defs_for_operand and that does
if (dt == vect_constant_def || dt == vect_external_def)
{
tree stmt_vectype = STMT_VINFO_VECTYPE (stmt_vinfo);
tree vector_type;
if (vectype)
vector_type = vectype;
else if (VECT_SCALAR_BOOLEAN_TYPE_P (TREE_TYPE (op))
&& VECTOR_BOOLEAN_TYPE_P (stmt_vectype))
vector_type = truth_type_for (stmt_vectype);
but of course stmt_vectype is not a boolean type but V8SI.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/102572] [11/12 Regression] ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 since r11-3070-g783dc66f9ccb0019
2021-10-03 3:39 [Bug tree-optimization/102572] New: ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 vsevolod.livinskij at frtk dot ru
` (4 preceding siblings ...)
2021-10-12 11:39 ` rguenth at gcc dot gnu.org
@ 2021-10-12 12:50 ` cvs-commit at gcc dot gnu.org
2021-10-12 12:50 ` [Bug tree-optimization/102572] [11 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-12 12:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102572
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:9f12a45ef147e563f099c24c293830727e8204cc
commit r12-4350-g9f12a45ef147e563f099c24c293830727e8204cc
Author: Richard Biener <rguenther@suse.de>
Date: Tue Oct 12 13:42:08 2021 +0200
tree-optimization/102572 - fix gathers with invariant mask
This fixes the vector def gathering for invariant masks which
failed to pass in the desired vector type resulting in a non-mask
type to be generate.
2021-10-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/102572
* tree-vect-stmts.c (vect_build_gather_load_calls): When
gathering the vectorized defs for the mask pass in the
desired mask vector type so invariants will be handled
correctly.
* g++.dg/vect/pr102572.cc: New testcase.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/102572] [11 Regression] ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 since r11-3070-g783dc66f9ccb0019
2021-10-03 3:39 [Bug tree-optimization/102572] New: ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 vsevolod.livinskij at frtk dot ru
` (5 preceding siblings ...)
2021-10-12 12:50 ` cvs-commit at gcc dot gnu.org
@ 2021-10-12 12:50 ` rguenth at gcc dot gnu.org
2021-11-08 12:35 ` cvs-commit at gcc dot gnu.org
2021-11-08 12:37 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-12 12:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102572
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |12.0
Summary|[11/12 Regression] ICE for |[11 Regression] ICE for skx
|skx in |in
|vect_build_gather_load_call |vect_build_gather_load_call
|s, at |s, at
|tree-vect-stmts.c:2835 |tree-vect-stmts.c:2835
|since |since
|r11-3070-g783dc66f9ccb0019 |r11-3070-g783dc66f9ccb0019
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/102572] [11 Regression] ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 since r11-3070-g783dc66f9ccb0019
2021-10-03 3:39 [Bug tree-optimization/102572] New: ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 vsevolod.livinskij at frtk dot ru
` (6 preceding siblings ...)
2021-10-12 12:50 ` [Bug tree-optimization/102572] [11 " rguenth at gcc dot gnu.org
@ 2021-11-08 12:35 ` cvs-commit at gcc dot gnu.org
2021-11-08 12:37 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-08 12:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102572
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:092e98d94080ca253dc4ef6957d6efaeccb88df6
commit r11-9225-g092e98d94080ca253dc4ef6957d6efaeccb88df6
Author: Richard Biener <rguenther@suse.de>
Date: Tue Oct 12 13:42:08 2021 +0200
tree-optimization/102572 - fix gathers with invariant mask
This fixes the vector def gathering for invariant masks which
failed to pass in the desired vector type resulting in a non-mask
type to be generate.
2021-10-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/102572
* tree-vect-stmts.c (vect_build_gather_load_calls): When
gathering the vectorized defs for the mask pass in the
desired mask vector type so invariants will be handled
correctly.
* g++.dg/vect/pr102572.cc: New testcase.
(cherry picked from commit 9f12a45ef147e563f099c24c293830727e8204cc)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/102572] [11 Regression] ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 since r11-3070-g783dc66f9ccb0019
2021-10-03 3:39 [Bug tree-optimization/102572] New: ICE for skx in vect_build_gather_load_calls, at tree-vect-stmts.c:2835 vsevolod.livinskij at frtk dot ru
` (7 preceding siblings ...)
2021-11-08 12:35 ` cvs-commit at gcc dot gnu.org
@ 2021-11-08 12:37 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-08 12:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102572
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |11.2.1
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread