public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1705] Fix ICE for vpexpand*.
@ 2021-06-22 1:35 hongtao Liu
0 siblings, 0 replies; only message in thread
From: hongtao Liu @ 2021-06-22 1:35 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b6efffa552cee6a20a58c91e5f41466c5715d73d
commit r12-1705-gb6efffa552cee6a20a58c91e5f41466c5715d73d
Author: liuhongt <hongtao.liu@intel.com>
Date: Wed Apr 28 14:52:59 2021 +0800
Fix ICE for vpexpand*.
gcc/ChangeLog
PR target/100310
* config/i386/i386-expand.c
(ix86_expand_special_args_builtin): Keep constm1_operand only
if it satisfies insn's operand predicate.
gcc/testsuite/ChangeLog
PR target/100310
* gcc.target/i386/pr100310.c: New test.
Diff:
---
gcc/config/i386/i386-expand.c | 5 +++--
gcc/testsuite/gcc.target/i386/pr100310.c | 12 ++++++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c
index 8f4e4e4d884..cc2eaeed8df 100644
--- a/gcc/config/i386/i386-expand.c
+++ b/gcc/config/i386/i386-expand.c
@@ -10969,11 +10969,12 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
op = fixup_modeless_constant (op, mode);
- /* NB: 3-operands load implied it's a mask load,
+ /* NB: 3-operands load implied it's a mask load or v{p}expand*,
and that mask operand shoud be at the end.
Keep all-ones mask which would be simplified by the expander. */
if (nargs == 3 && i == 2 && klass == load
- && constm1_operand (op, mode))
+ && constm1_operand (op, mode)
+ && insn_p->operand[i].predicate (op, mode))
;
else if (GET_MODE (op) == mode || GET_MODE (op) == VOIDmode)
op = copy_to_mode_reg (mode, op);
diff --git a/gcc/testsuite/gcc.target/i386/pr100310.c b/gcc/testsuite/gcc.target/i386/pr100310.c
new file mode 100644
index 00000000000..54ace18531b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr100310.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+#include <immintrin.h>
+
+double *p;
+volatile __m512d x;
+volatile __mmask8 m;
+
+void foo()
+{
+ x = _mm512_mask_expandloadu_pd (x, 255, p);
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-22 1:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22 1:35 [gcc r12-1705] Fix ICE for vpexpand* hongtao Liu
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).