* [Bug bootstrap/102847] [12 regression] r12-4504 breaks powerpc64 build on power 7
2021-10-19 20:31 [Bug bootstrap/102847] New: [12 regression] r12-4504 breaks powerpc64 build on power 7 seurer at gcc dot gnu.org
@ 2021-10-19 21:17 ` pinskia at gcc dot gnu.org
2021-10-19 21:20 ` [Bug target/102847] " pinskia at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-19 21:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102847
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=102767
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I highly doubt r12-4504 broke bootstrap on Linux.
Also I suspect it is related to PR 102767.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/102847] [12 regression] r12-4504 breaks powerpc64 build on power 7
2021-10-19 20:31 [Bug bootstrap/102847] New: [12 regression] r12-4504 breaks powerpc64 build on power 7 seurer at gcc dot gnu.org
2021-10-19 21:17 ` [Bug bootstrap/102847] " pinskia at gcc dot gnu.org
@ 2021-10-19 21:20 ` pinskia at gcc dot gnu.org
2021-10-20 6:53 ` marxin at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-19 21:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102847
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Component|bootstrap |target
Keywords| |build, ice-on-valid-code
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/102847] [12 regression] r12-4504 breaks powerpc64 build on power 7
2021-10-19 20:31 [Bug bootstrap/102847] New: [12 regression] r12-4504 breaks powerpc64 build on power 7 seurer at gcc dot gnu.org
2021-10-19 21:17 ` [Bug bootstrap/102847] " pinskia at gcc dot gnu.org
2021-10-19 21:20 ` [Bug target/102847] " pinskia at gcc dot gnu.org
@ 2021-10-20 6:53 ` marxin at gcc dot gnu.org
2021-10-20 14:23 ` seurer at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-20 6:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102847
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |marxin at gcc dot gnu.org
Resolution|--- |DUPLICATE
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Dup.
*** This bug has been marked as a duplicate of bug 102767 ***
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/102847] [12 regression] r12-4504 breaks powerpc64 build on power 7
2021-10-19 20:31 [Bug bootstrap/102847] New: [12 regression] r12-4504 breaks powerpc64 build on power 7 seurer at gcc dot gnu.org
` (2 preceding siblings ...)
2021-10-20 6:53 ` marxin at gcc dot gnu.org
@ 2021-10-20 14:23 ` seurer at gcc dot gnu.org
2021-10-21 7:30 ` linkw at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: seurer at gcc dot gnu.org @ 2021-10-20 14:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102847
--- Comment #3 from seurer at gcc dot gnu.org ---
I reran my bisects on two different systems and both resolved to
g:793d2549b173a0a2da6dd20ffc27acb9fd2de73e, r12-4501
as when the builds started failing. r12-4500 worked on both systems.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/102847] [12 regression] r12-4504 breaks powerpc64 build on power 7
2021-10-19 20:31 [Bug bootstrap/102847] New: [12 regression] r12-4504 breaks powerpc64 build on power 7 seurer at gcc dot gnu.org
` (3 preceding siblings ...)
2021-10-20 14:23 ` seurer at gcc dot gnu.org
@ 2021-10-21 7:30 ` linkw at gcc dot gnu.org
2021-10-21 8:21 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: linkw at gcc dot gnu.org @ 2021-10-21 7:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102847
Kewen Lin <linkw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Last reconfirmed| |2021-10-21
Ever confirmed|0 |1
CC| |rguenth at gcc dot gnu.org
Resolution|DUPLICATE |---
--- Comment #4 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to seurer from comment #3)
> I reran my bisects on two different systems and both resolved to
>
> g:793d2549b173a0a2da6dd20ffc27acb9fd2de73e, r12-4501
>
> as when the builds started failing. r12-4500 worked on both systems.
Thanks! It makes more sense, I tried my local fix for PR102767 on a Power7 BE
machine yesterday, this issue still existed, seems not an actual dup. Some
relevant commits are r11-1945 and r11-6717.
In function get_load_store_type, we just simply assign the
alignment_support_scheme to dr_unaligned_supported for VMAT_INVARIANT, without
going through the check in vect_supportable_dr_alignment (including target hook
checks).
IIUC, VMAT_INVARIANT memory accesses will end up with scalar accesses, it looks
intentional, but it's unexpected for rs6000_builtin_vectorization_cost, as
function rs6000_builtin_support_vector_misalignment says it only allows
element_size 32 and 64 for misalignment -1. In this failure, it's V16QI (aka,
element_size 8).
Not sure if it's a good idea to change *alignment_support_scheme to dr_aligned
for VMAT_INVARIANT (also for strided)? Or force *misalignment to zero, then we
can distinguish this kind of special case in builtin_vectorization_cost hook to
avoid ICE?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/102847] [12 regression] r12-4504 breaks powerpc64 build on power 7
2021-10-19 20:31 [Bug bootstrap/102847] New: [12 regression] r12-4504 breaks powerpc64 build on power 7 seurer at gcc dot gnu.org
` (4 preceding siblings ...)
2021-10-21 7:30 ` linkw at gcc dot gnu.org
@ 2021-10-21 8:21 ` rguenth at gcc dot gnu.org
2021-10-21 9:21 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-21 8:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102847
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 9cbc1af4cc9..8f527452bd0 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -1191,6 +1191,13 @@ vect_model_load_cost (vec_info *vinfo,
ncopies * assumed_nunits,
scalar_load, stmt_info, 0, vect_body);
}
+ else if (memory_access_type == VMAT_INVARIANT)
+ {
+ /* Invariant loads will ideally be hoisted and splat to a vector. */
+ prologue_cost += record_stmt_cost (cost_vec, 1,
+ scalar_to_vec, stmt_info, 0,
+ vect_prologue);
+ }
else
vect_get_load_cost (vinfo, stmt_info, ncopies,
alignment_support_scheme, misalignment, first_stmt_p,
should fix that in a better way.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/102847] [12 regression] r12-4504 breaks powerpc64 build on power 7
2021-10-19 20:31 [Bug bootstrap/102847] New: [12 regression] r12-4504 breaks powerpc64 build on power 7 seurer at gcc dot gnu.org
` (5 preceding siblings ...)
2021-10-21 8:21 ` rguenth at gcc dot gnu.org
@ 2021-10-21 9:21 ` cvs-commit at gcc dot gnu.org
2021-10-21 9:21 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-21 9:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102847
--- 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:7878981f1d44b4c9bb6c4a3137b37f06c725b73d
commit r12-4603-g7878981f1d44b4c9bb6c4a3137b37f06c725b73d
Author: Richard Biener <rguenther@suse.de>
Date: Thu Oct 21 10:24:03 2021 +0200
tree-optimization/102847 - properly cost VMAT_INVARIANT loads
The following adds proper costing of VMAT_INVARIANT loads, avoiding
to ask the target about the cost of an unsupported vector load cost
which we won't emit anyway.
2021-10-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/102847
* tree-vect-stmts.c (vect_model_load_cost): Explicitely
handle VMAT_INVARIANT as a splat in the prologue.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/102847] [12 regression] r12-4504 breaks powerpc64 build on power 7
2021-10-19 20:31 [Bug bootstrap/102847] New: [12 regression] r12-4504 breaks powerpc64 build on power 7 seurer at gcc dot gnu.org
` (6 preceding siblings ...)
2021-10-21 9:21 ` cvs-commit at gcc dot gnu.org
@ 2021-10-21 9:21 ` rguenth at gcc dot gnu.org
2021-10-21 9:45 ` linkw at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-21 9:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102847
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed hopefully.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/102847] [12 regression] r12-4504 breaks powerpc64 build on power 7
2021-10-19 20:31 [Bug bootstrap/102847] New: [12 regression] r12-4504 breaks powerpc64 build on power 7 seurer at gcc dot gnu.org
` (7 preceding siblings ...)
2021-10-21 9:21 ` rguenth at gcc dot gnu.org
@ 2021-10-21 9:45 ` linkw at gcc dot gnu.org
2021-10-21 9:49 ` rguenther at suse dot de
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: linkw at gcc dot gnu.org @ 2021-10-21 9:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102847
--- Comment #8 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #5)
> diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
> index 9cbc1af4cc9..8f527452bd0 100644
> --- a/gcc/tree-vect-stmts.c
> +++ b/gcc/tree-vect-stmts.c
> @@ -1191,6 +1191,13 @@ vect_model_load_cost (vec_info *vinfo,
> ncopies * assumed_nunits,
> scalar_load, stmt_info, 0, vect_body);
> }
> + else if (memory_access_type == VMAT_INVARIANT)
> + {
> + /* Invariant loads will ideally be hoisted and splat to a vector. */
> + prologue_cost += record_stmt_cost (cost_vec, 1,
> + scalar_to_vec, stmt_info, 0,
> + vect_prologue);
> + }
> else
> vect_get_load_cost (vinfo, stmt_info, ncopies,
> alignment_support_scheme, misalignment, first_stmt_p,
>
> should fix that in a better way.
Nice, I confirmed this change can fix the issue. Thanks!
For costing, it seems we need one more scalar_load costing for vect_prologue?
or here we aggressively consider scalar_to_vec is also for load_and_splat?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/102847] [12 regression] r12-4504 breaks powerpc64 build on power 7
2021-10-19 20:31 [Bug bootstrap/102847] New: [12 regression] r12-4504 breaks powerpc64 build on power 7 seurer at gcc dot gnu.org
` (8 preceding siblings ...)
2021-10-21 9:45 ` linkw at gcc dot gnu.org
@ 2021-10-21 9:49 ` rguenther at suse dot de
2021-10-21 11:04 ` cvs-commit at gcc dot gnu.org
2021-10-21 15:26 ` seurer at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: rguenther at suse dot de @ 2021-10-21 9:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102847
--- Comment #9 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 21 Oct 2021, linkw at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102847
>
> --- Comment #8 from Kewen Lin <linkw at gcc dot gnu.org> ---
> (In reply to Richard Biener from comment #5)
> > diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
> > index 9cbc1af4cc9..8f527452bd0 100644
> > --- a/gcc/tree-vect-stmts.c
> > +++ b/gcc/tree-vect-stmts.c
> > @@ -1191,6 +1191,13 @@ vect_model_load_cost (vec_info *vinfo,
> > ncopies * assumed_nunits,
> > scalar_load, stmt_info, 0, vect_body);
> > }
> > + else if (memory_access_type == VMAT_INVARIANT)
> > + {
> > + /* Invariant loads will ideally be hoisted and splat to a vector. */
> > + prologue_cost += record_stmt_cost (cost_vec, 1,
> > + scalar_to_vec, stmt_info, 0,
> > + vect_prologue);
> > + }
> > else
> > vect_get_load_cost (vinfo, stmt_info, ncopies,
> > alignment_support_scheme, misalignment, first_stmt_p,
> >
> > should fix that in a better way.
>
> Nice, I confirmed this change can fix the issue. Thanks!
>
> For costing, it seems we need one more scalar_load costing for vect_prologue?
> or here we aggressively consider scalar_to_vec is also for load_and_splat?
Yeah, true. Let me follow up.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/102847] [12 regression] r12-4504 breaks powerpc64 build on power 7
2021-10-19 20:31 [Bug bootstrap/102847] New: [12 regression] r12-4504 breaks powerpc64 build on power 7 seurer at gcc dot gnu.org
` (9 preceding siblings ...)
2021-10-21 9:49 ` rguenther at suse dot de
@ 2021-10-21 11:04 ` cvs-commit at gcc dot gnu.org
2021-10-21 15:26 ` seurer at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-21 11:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102847
--- Comment #10 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:8516963942b0a8f06fa8f5ebd7c37f9edea151ac
commit r12-4604-g8516963942b0a8f06fa8f5ebd7c37f9edea151ac
Author: Richard Biener <rguenther@suse.de>
Date: Thu Oct 21 12:10:20 2021 +0200
tree-optimization/102847 - adjust VMAT_INVARIANT load costing
This adds the missing scalar load cost in the prologue.
2021-10-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/102847
* tree-vect-stmts.c (vect_model_load_cost): Add the scalar
load cost in the prologue for VMAT_INVARIANT.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/102847] [12 regression] r12-4504 breaks powerpc64 build on power 7
2021-10-19 20:31 [Bug bootstrap/102847] New: [12 regression] r12-4504 breaks powerpc64 build on power 7 seurer at gcc dot gnu.org
` (10 preceding siblings ...)
2021-10-21 11:04 ` cvs-commit at gcc dot gnu.org
@ 2021-10-21 15:26 ` seurer at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: seurer at gcc dot gnu.org @ 2021-10-21 15:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102847
--- Comment #11 from seurer at gcc dot gnu.org ---
The build is indeed once again working on power 7. Thanks!
^ permalink raw reply [flat|nested] 13+ messages in thread