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 8ec312d7470c460f55d0ab056097052518b56a48..2445523f274fd5a4729861779d2fe62f2eab8ee0 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 864db64d20025ff4691172d8bc9434f3f8eded01..e1061ede061751f5fd6c55edb56671a854e7456e 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)
                    {