public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Prathamesh Kulkarni <prathamesh3492@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2494] tree-ssa-forwprop.cc: Adjust res_type when operands have differing vector lengths. Date: Tue, 6 Sep 2022 09:51:26 +0000 (GMT) [thread overview] Message-ID: <20220906095126.B3CD738582AD@sourceware.org> (raw) https://gcc.gnu.org/g:e55674b86a10e695cea2f45c0472402b97cc2dfb commit r13-2494-ge55674b86a10e695cea2f45c0472402b97cc2dfb Author: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> Date: Tue Sep 6 15:18:04 2022 +0530 tree-ssa-forwprop.cc: Adjust res_type when operands have differing vector lengths. gcc/ * tree-ssa-forwprop.cc (simplify_permutation): Set res_type to a vector type with same element type as arg0, and length as op2. Diff: --- gcc/tree-ssa-forwprop.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc index fdc4bc8909d..4b693ef095c 100644 --- a/gcc/tree-ssa-forwprop.cc +++ b/gcc/tree-ssa-forwprop.cc @@ -2661,7 +2661,9 @@ simplify_permutation (gimple_stmt_iterator *gsi) /* Shuffle of a constructor. */ bool ret = false; - tree res_type = TREE_TYPE (arg0); + tree res_type + = build_vector_type (TREE_TYPE (TREE_TYPE (arg0)), + TYPE_VECTOR_SUBPARTS (TREE_TYPE (op2))); tree opt = fold_ternary (VEC_PERM_EXPR, res_type, arg0, arg1, op2); if (!opt || (TREE_CODE (opt) != CONSTRUCTOR && TREE_CODE (opt) != VECTOR_CST))
reply other threads:[~2022-09-06 9:51 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220906095126.B3CD738582AD@sourceware.org \ --to=prathamesh3492@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).