]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Revert "forwprop: Use lhs type instead of arg0 in folding VEC_PERM_EXPR."
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Thu, 21 Jul 2022 11:36:03 +0000 (17:06 +0530)
committerPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Thu, 21 Jul 2022 11:41:06 +0000 (17:11 +0530)
This reverts commit 4c3231302577445417715a7c22e879e4159376d3.

gcc/ChangeLog:
Revert:
* tree-ssa-forwprop.cc (simplify_permutation): Use lhs type
instead of TREE_TYPE (arg0) as result type in folding VEC_PERM_EXPR.

gcc/tree-ssa-forwprop.cc

index d04cf4bccf8b18cd6d6bd773d93ae360272a3d59..fdc4bc8909d2763876550e53277ff2b3dcca796a 100644 (file)
@@ -2661,7 +2661,7 @@ simplify_permutation (gimple_stmt_iterator *gsi)
 
       /* Shuffle of a constructor.  */
       bool ret = false;
-      tree res_type = TREE_TYPE (gimple_assign_lhs (stmt));
+      tree res_type = TREE_TYPE (arg0);
       tree opt = fold_ternary (VEC_PERM_EXPR, res_type, arg0, arg1, op2);
       if (!opt
          || (TREE_CODE (opt) != CONSTRUCTOR && TREE_CODE (opt) != VECTOR_CST))