public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-8594] expr: Fix up VEC_PACK_TRUNC_EXPR expansion [PR101046] Date: Thu, 17 Jun 2021 05:59:44 +0000 (GMT) [thread overview] Message-ID: <20210617055944.A0ACA3839819@sourceware.org> (raw) https://gcc.gnu.org/g:5ece5ac99e804cccc3d8534d8871eb72e08edb06 commit r11-8594-g5ece5ac99e804cccc3d8534d8871eb72e08edb06 Author: Jakub Jelinek <jakub@redhat.com> Date: Tue Jun 15 11:36:47 2021 +0200 expr: Fix up VEC_PACK_TRUNC_EXPR expansion [PR101046] The following testcase ICEs, because we have a mode mismatch. VEC_PACK_TRUNC_EXPR's operands have different modes from the result (same vector mode size but twice as large element), but we were passing non-NULL subtarget with the mode of the result to the expansion of its arguments, so the VEC_PERM_EXPR in one of the operands which had V8SImode operands and result had V16HImode target. Fixed by clearing the subtarget if we are changing mode. 2021-06-15 Jakub Jelinek <jakub@redhat.com> PR target/101046 * expr.c (expand_expr_real_2) <case VEC_PACK_FIX_TRUNC_EXPR, case VEC_PACK_TRUNC_EXPR>: Clear subtarget when changing mode. (cherry picked from commit 008153c8435ca3bf587e11654c31f05c0f99b43a) Diff: --- gcc/expr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/expr.c b/gcc/expr.c index a0e19465965..14a25c25450 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -9809,6 +9809,7 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode, case VEC_PACK_SAT_EXPR: case VEC_PACK_FIX_TRUNC_EXPR: mode = TYPE_MODE (TREE_TYPE (treeop0)); + subtarget = NULL_RTX; goto binop; case VEC_PACK_TRUNC_EXPR: @@ -9832,6 +9833,7 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode, return eops[0].value; } mode = TYPE_MODE (TREE_TYPE (treeop0)); + subtarget = NULL_RTX; goto binop; case VEC_PACK_FLOAT_EXPR:
reply other threads:[~2021-06-17 5:59 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=20210617055944.A0ACA3839819@sourceware.org \ --to=jakub@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).