]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-vect-slp.c (vect_get_and_check_slp_defs): Handle VIEW_CONVERT_EXPR.
authorRichard Biener <rguenther@suse.de>
Mon, 13 May 2019 11:42:08 +0000 (11:42 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 13 May 2019 11:42:08 +0000 (11:42 +0000)
2019-05-13  Richard Biener  <rguenther@suse.de>

* tree-vect-slp.c (vect_get_and_check_slp_defs): Handle
VIEW_CONVERT_EXPR.
(vect_build_slp_tree_1): Likewise.

From-SVN: r271126

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

index 925d23ca69d3c23db35a7a76d30162ed2fc00a98..3057c620e53361e83b44b0ec1003302ed9a3476f 100644 (file)
@@ -1,3 +1,9 @@
+2019-05-13  Richard Biener  <rguenther@suse.de>
+
+       * tree-vect-slp.c (vect_get_and_check_slp_defs): Handle
+       VIEW_CONVERT_EXPR.
+       (vect_build_slp_tree_1): Likewise.
+
 2019-05-13  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/90402
index 2a1e5b83e53ae43c6491c5864b1649c37ad46e03..52c7b47d8095e80c83c60204539dff3fb2242616 100644 (file)
@@ -333,7 +333,7 @@ vect_get_and_check_slp_defs (vec_info *vinfo, unsigned char *swap,
       number_of_oprnds = gimple_num_ops (stmt) - 1;
       /* Swap can only be done for cond_expr if asked to, otherwise we
         could result in different comparison code to the first stmt.  */
-      if (gimple_assign_rhs_code (stmt) == COND_EXPR
+      if (code == COND_EXPR
          && COMPARISON_CLASS_P (gimple_assign_rhs1 (stmt)))
        {
          first_op_cond = true;
@@ -364,6 +364,8 @@ again:
        }
       else
        oprnd = gimple_op (stmt_info->stmt, first_op_idx + (swapped ? !i : i));
+      if (TREE_CODE (oprnd) == VIEW_CONVERT_EXPR)
+       oprnd = TREE_OPERAND (oprnd, 0);
 
       oprnd_info = (*oprnds_info)[i];
 
@@ -907,6 +909,7 @@ vect_build_slp_tree_1 (unsigned char *swap,
              && TREE_CODE_CLASS (rhs_code) != tcc_unary
              && TREE_CODE_CLASS (rhs_code) != tcc_expression
              && TREE_CODE_CLASS (rhs_code) != tcc_comparison
+             && rhs_code != VIEW_CONVERT_EXPR
              && rhs_code != CALL_EXPR)
            {
              if (dump_enabled_p ())