tree-vect-slp.c (vect_build_slp_tree_2): Do not build op from scalars in case there...
authorRichard Biener <rguenther@suse.de>
Wed, 23 Oct 2019 06:45:03 +0000 (06:45 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 23 Oct 2019 06:45:03 +0000 (06:45 +0000)
2019-10-23  Richard Biener  <rguenther@suse.de>

* 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
gcc/tree-vect-slp.c

index 8ec312d..2445523 100644 (file)
@@ -1,3 +1,9 @@
+2019-10-23  Richard Biener  <rguenther@suse.de>
+
+       * 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  <iain@sandoe.co.uk>
 
        * config/rs6000/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Guard
index 864db64..e1061ed 100644 (file)
@@ -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)
                    {