From f99d62629933adf91e7e0bc1b1ff344ffb68e1a2 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 23 Oct 2019 06:45:03 +0000 Subject: [PATCH] tree-vect-slp.c (vect_build_slp_tree_2): Do not build op from scalars in case there's a constant operand in its definition. 2019-10-23 Richard Biener * tree-vect-slp.c (vect_build_slp_tree_2): Do not build op from scalars in case there's a constant operand in its definition. From-SVN: r277308 --- gcc/ChangeLog | 6 ++++++ gcc/tree-vect-slp.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ec312d7470..2445523f274 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-23 Richard Biener + + * tree-vect-slp.c (vect_build_slp_tree_2): Do not build + op from scalars in case there's a constant operand in its + definition. + 2019-10-23 Iain Sandoe * config/rs6000/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Guard diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 864db64d200..e1061ede061 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -1291,7 +1291,7 @@ vect_build_slp_tree_2 (vec_info *vinfo, slp_tree grandchild; FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (child), j, grandchild) - if (SLP_TREE_DEF_TYPE (grandchild) == vect_internal_def) + if (SLP_TREE_DEF_TYPE (grandchild) != vect_external_def) break; if (!grandchild) { @@ -1450,7 +1450,7 @@ vect_build_slp_tree_2 (vec_info *vinfo, slp_tree grandchild; FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (child), j, grandchild) - if (SLP_TREE_DEF_TYPE (grandchild) == vect_internal_def) + if (SLP_TREE_DEF_TYPE (grandchild) != vect_external_def) break; if (!grandchild) { -- 2.30.2