public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r10-10619] expr: Fix up VEC_PACK_TRUNC_EXPR expansion [PR101046]
@ 2022-05-10 8:18 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2022-05-10 8:18 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:8f79b09894c6037d0a376be239567ebdce42ea0e
commit r10-10619-g8f79b09894c6037d0a376be239567ebdce42ea0e
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 c4bffd0f199..10f0b816dd1 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -9658,6 +9658,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:
@@ -9681,6 +9682,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:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-10 8:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 8:18 [gcc r10-10619] expr: Fix up VEC_PACK_TRUNC_EXPR expansion [PR101046] Jakub Jelinek
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).