Restore stmt def types after scheduling two-operation SLP
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 20 Nov 2019 21:15:54 +0000 (21:15 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 20 Nov 2019 21:15:54 +0000 (21:15 +0000)
2019-11-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-slp.c (vect_schedule_slp_instance): Restore stmt
def types for two-operation SLP.

From-SVN: r278533

gcc/ChangeLog
gcc/tree-vect-slp.c

index 3ddaa8a059dffe282a6145e0e314df60acf6c843..cf06e3aad080ef458fabfba1a286360ec372879a 100644 (file)
@@ -1,3 +1,8 @@
+2019-11-20  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * tree-vect-slp.c (vect_schedule_slp_instance): Restore stmt
+       def types for two-operation SLP.
+
 2019-11-20  Richard Sandiford  <richard.sandiford@arm.com>
 
        PR testsuite/92366
index 36ea0b1dffb70b905ef1e9f80cdc6d6344d4c53b..dfbde1a3c77fd9af2c3fe3905dcbdcadee058a49 100644 (file)
@@ -4153,6 +4153,7 @@ vect_schedule_slp_instance (slp_tree node, slp_instance instance)
 
   /* Handle two-operation SLP nodes by vectorizing the group with
      both operations and then performing a merge.  */
+  bool done_p = false;
   if (SLP_TREE_TWO_OPERATORS (node))
     {
       gassign *stmt = as_a <gassign *> (stmt_info->stmt);
@@ -4223,10 +4224,11 @@ vect_schedule_slp_instance (slp_tree node, slp_instance instance)
            }
          v0.release ();
          v1.release ();
-         return;
+         done_p = true;
        }
     }
-  vect_transform_stmt (stmt_info, &si, node, instance);
+  if (!done_p)
+    vect_transform_stmt (stmt_info, &si, node, instance);
 
   /* Restore stmt def-types.  */
   FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (node), i, child)