diff options
author | Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> | 2022-07-19 17:43:26 +0530 |
---|---|---|
committer | Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> | 2022-07-19 17:45:41 +0530 |
commit | 4c3231302577445417715a7c22e879e4159376d3 (patch) | |
tree | b4a3d1667f27c7010e775e74e572776773d8dc06 /gcc | |
parent | f082bc79c104aa308cd4acca5bf3adffd46da355 (diff) | |
download | gcc-4c3231302577445417715a7c22e879e4159376d3.zip gcc-4c3231302577445417715a7c22e879e4159376d3.tar.gz gcc-4c3231302577445417715a7c22e879e4159376d3.tar.bz2 |
forwprop: Use lhs type instead of arg0 in folding VEC_PERM_EXPR.
gcc/ChangeLog:
* tree-ssa-forwprop.cc (simplify_permutation): Use lhs type
instead of TREE_TYPE (arg0) as result type in folding VEC_PERM_EXPR.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/tree-ssa-forwprop.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc index fdc4bc8..d04cf4b 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 (arg0); + tree res_type = TREE_TYPE (gimple_assign_lhs (stmt)); tree opt = fold_ternary (VEC_PERM_EXPR, res_type, arg0, arg1, op2); if (!opt || (TREE_CODE (opt) != CONSTRUCTOR && TREE_CODE (opt) != VECTOR_CST)) |