public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1745] forwprop: Use lhs type instead of arg0 in folding VEC_PERM_EXPR.
@ 2022-07-19 12:16 Prathamesh Kulkarni
  0 siblings, 0 replies; only message in thread
From: Prathamesh Kulkarni @ 2022-07-19 12:16 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4c3231302577445417715a7c22e879e4159376d3

commit r13-1745-g4c3231302577445417715a7c22e879e4159376d3
Author: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Date:   Tue Jul 19 17:43:26 2022 +0530

    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.

Diff:
---
 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 fdc4bc8909d..d04cf4bccf8 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))


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-19 12:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19 12:16 [gcc r13-1745] forwprop: Use lhs type instead of arg0 in folding VEC_PERM_EXPR Prathamesh Kulkarni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).