diff options
author | Richard Biener <rguenther@suse.de> | 2021-04-06 11:21:47 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-04-06 12:15:30 +0200 |
commit | 58cd9fc8a61de09ba181c5ed5ac7fb91ec506414 (patch) | |
tree | 6646a9e6dd1527803285dfe079847d69b4a4bd63 /gcc | |
parent | ffc2331d7994d7fabb1f6ebed931024a9bbe69f2 (diff) | |
download | gcc-58cd9fc8a61de09ba181c5ed5ac7fb91ec506414.zip gcc-58cd9fc8a61de09ba181c5ed5ac7fb91ec506414.tar.gz gcc-58cd9fc8a61de09ba181c5ed5ac7fb91ec506414.tar.bz2 |
tree-optimization/99924 - visit permute nodes again when partitioning
Since SLP graph partitioning works on scalar stmts (because it's done
for costing) we have to make sure to visit permute nodes multiple
times since they will not pull partitions together.
2021-04-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/99924
* tree-vect-slp.c (vect_bb_partition_graph_r): Do not mark
nodes w/o scalar stmts as visited.
* gfortran.dg/vect/pr99924.f90: New testcase.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gfortran.dg/vect/pr99924.f90 | 12 | ||||
-rw-r--r-- | gcc/tree-vect-slp.c | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/testsuite/gfortran.dg/vect/pr99924.f90 b/gcc/testsuite/gfortran.dg/vect/pr99924.f90 new file mode 100644 index 0000000..f271ea1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/vect/pr99924.f90 @@ -0,0 +1,12 @@ +! { dg-do compile } +! { dg-additional-options "-march=armv8.3-a" { target aarch64-*-* } } +subroutine cunhj (tfn, asum, bsum) + implicit none + complex :: up, tfn, asum, bsum + real :: ar + + up = tfn * ar + bsum = up + ar + asum = up + asum + return +end subroutine cunhj diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index ceec7f5..58dedfc 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -4224,7 +4224,7 @@ vect_bb_partition_graph_r (bb_vec_info bb_vinfo, stmt_instance = instance; } - if (visited.add (node)) + if (!SLP_TREE_SCALAR_STMTS (node).is_empty () && visited.add (node)) return; slp_tree child; |