diff options
author | Richard Biener <rguenther@suse.de> | 2013-03-28 09:55:15 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2013-03-28 09:55:15 +0000 |
commit | a64b9c261d9d2c12b98bd14f5f1bf27e3bcb6bdd (patch) | |
tree | fcc4b9380bfadbb4d5f3785c7d03fcf3f6818fc9 /gcc/tree-vect-slp.c | |
parent | a9dc2a2f95a6a88c99a75aa16f7a43f2c2c3e93a (diff) | |
download | gcc-a64b9c261d9d2c12b98bd14f5f1bf27e3bcb6bdd.zip gcc-a64b9c261d9d2c12b98bd14f5f1bf27e3bcb6bdd.tar.gz gcc-a64b9c261d9d2c12b98bd14f5f1bf27e3bcb6bdd.tar.bz2 |
re PR tree-optimization/37021 (Fortran Complex reduction / multiplication not vectorized)
2013-03-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/37021
* tree-vect-slp.c (vect_build_slp_tree): When not unrolling
do not restrict gaps between groups.
* tree-vect-stmts.c (vectorizable_load): Properly account for
a gap between groups.
* gcc.dg/vect/fast-math-slp-38.c: New testcase.
* gcc.dg/vect/O3-pr36098.c: Un-XFAIL.
From-SVN: r197189
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r-- | gcc/tree-vect-slp.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 8ef5d06..e925f57 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -740,11 +740,16 @@ vect_build_slp_tree (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo, else { /* Load. */ - /* FORNOW: Check that there is no gap between the loads. */ - if ((GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt)) == stmt - && GROUP_GAP (vinfo_for_stmt (stmt)) != 0) - || (GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt)) != stmt - && GROUP_GAP (vinfo_for_stmt (stmt)) != 1)) + /* FORNOW: Check that there is no gap between the loads + and no gap between the groups when we need to load + multiple groups at once. + ??? We should enhance this to only disallow gaps + inside vectors. */ + if ((ncopies > 1 + && GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt)) == stmt + && GROUP_GAP (vinfo_for_stmt (stmt)) != 0) + || (GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt)) != stmt + && GROUP_GAP (vinfo_for_stmt (stmt)) != 1)) { if (dump_enabled_p ()) { @@ -762,7 +767,10 @@ vect_build_slp_tree (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo, /* Check that the size of interleaved loads group is not greater than the SLP group size. */ if (loop_vinfo - && GROUP_SIZE (vinfo_for_stmt (stmt)) > ncopies * group_size) + && GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt)) == stmt + && ((GROUP_SIZE (vinfo_for_stmt (stmt)) + - GROUP_GAP (vinfo_for_stmt (stmt))) + > ncopies * group_size)) { if (dump_enabled_p ()) { |