From 9a52d6871a268a6a1fc3d0a3660120c44ee94951 Mon Sep 17 00:00:00 2001 From: Prathamesh Kulkarni Date: Thu, 21 Jul 2022 17:06:03 +0530 Subject: [PATCH] Revert "forwprop: Use lhs type instead of arg0 in folding VEC_PERM_EXPR." 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc index d04cf4bccf8..fdc4bc8909d 100644 --- a/gcc/tree-ssa-forwprop.cc +++ b/gcc/tree-ssa-forwprop.cc @@ -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)) -- 2.47.2