public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1387] tree-optimization/101026 - fix SLP re-association
@ 2021-06-11 11:35 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2021-06-11 11:35 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:fbd8a8041292f2ec2c22be43c8d3e74b37b2bc88
commit r12-1387-gfbd8a8041292f2ec2c22be43c8d3e74b37b2bc88
Author: Richard Biener <rguenther@suse.de>
Date: Fri Jun 11 13:33:17 2021 +0200
tree-optimization/101026 - fix SLP re-association
Since we cannot yet encode the operation in the SLP node itself
but need a representative stmt require an existing one for now
to avoid the need to build a fake GIMPLE stmt.
2021-06-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/101026
* tree-vect-slp.c (vect_build_slp_tree_2): Make sure we
have a representative for the associated chain nodes.
* gfortran.dg/pr101026.f: New testcase.
Diff:
---
gcc/testsuite/gfortran.dg/pr101026.f | 11 +++++++++++
gcc/tree-vect-slp.c | 4 +++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/gcc/testsuite/gfortran.dg/pr101026.f b/gcc/testsuite/gfortran.dg/pr101026.f
new file mode 100644
index 00000000000..9576d8802ca
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr101026.f
@@ -0,0 +1,11 @@
+! { dg-do compile }
+! { dg-options "-Ofast -frounding-math" }
+ SUBROUTINE PASSB4 (CC,CH)
+ DIMENSION CC(IDO,4,L1), CH(IDO,L1,*)
+ DO 103 I=2,IDO,2
+ TI4 = CC0-CC(I,4,K)
+ CI4 = TI1-TI4
+ CH(I-1,K,4) = CI4
+ CH(I,K,4) = CI4
+ 103 CONTINUE
+ END
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 6237a61ffd4..897bd6f37b9 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1860,7 +1860,9 @@ vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node,
chains.quick_push (chain.copy ());
chain.truncate (0);
}
- if (chains.length () == group_size)
+ if (chains.length () == group_size
+ /* We cannot yet use SLP_TREE_CODE to communicate the operation. */
+ && op_stmt_info)
{
/* Now we have a set of chains with the same length. */
/* 1. pre-sort according to def_type and operation. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-11 11:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11 11:35 [gcc r12-1387] tree-optimization/101026 - fix SLP re-association Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).