aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-pr65935.c5
-rw-r--r--gcc/tree-vect-slp.c10
2 files changed, 9 insertions, 6 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr65935.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pr65935.c
index ea37e4e..c262d73 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-pr65935.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pr65935.c
@@ -60,6 +60,7 @@ int main()
/* We should also be able to use 2-lane SLP to initialize the real and
imaginary components in the first loop of main. */
/* { dg-final { scan-tree-dump-times "optimized: basic block" 10 "slp1" } } */
-/* We should see the s->phase[dir] operand and only that operand built
+/* We should see the s->phase[dir] operand splatted and no other operand built
from scalars. See PR97334. */
-/* { dg-final { scan-tree-dump-times "Building vector operands from scalars" 1 "slp1" } } */
+/* { dg-final { scan-tree-dump-times "Using a splat" 1 "slp1" } } */
+/* { dg-final { scan-tree-dump-times "Building vector operands from scalars" 0 "slp1" } } */
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index ff3a0c2..0a7b8e6 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1627,8 +1627,10 @@ vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node,
break;
if (j == group_size
/* But avoid doing this for loads where we may be
- able to CSE things. */
- && !gimple_vuse (first_def->stmt))
+ able to CSE things, unless the stmt is not
+ vectorizable. */
+ && (!STMT_VINFO_VECTORIZABLE (first_def)
+ || !gimple_vuse (first_def->stmt)))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
@@ -2379,7 +2381,7 @@ vect_build_slp_instance (vec_info *vinfo,
if (dump_enabled_p ())
{
dump_printf_loc (MSG_NOTE, vect_location,
- "Final SLP tree for instance:\n");
+ "Final SLP tree for instance %p:\n", new_instance);
vect_print_slp_graph (MSG_NOTE, vect_location,
SLP_INSTANCE_TREE (new_instance));
}
@@ -3402,7 +3404,7 @@ vect_slp_convert_to_external (vec_info *vinfo, slp_tree node,
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
- "Building vector operands from scalars instead\n");
+ "Building vector operands of %p from scalars instead\n", node);
/* Don't remove and free the child nodes here, since they could be
referenced by other structures. The analysis and scheduling phases