public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2907] i386: Fix ICE with V64QImode broadcast permutation with -mavx512f -mno-avx512bw
@ 2021-08-14 9:48 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2021-08-14 9:48 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:240f07805db27cfc746276039c5edccb4c031070
commit r12-2907-g240f07805db27cfc746276039c5edccb4c031070
Author: Jakub Jelinek <jakub@redhat.com>
Date: Sat Aug 14 11:44:46 2021 +0200
i386: Fix ICE with V64QImode broadcast permutation with -mavx512f -mno-avx512bw
The testcase shows another problem, for TARGET_AVX512BW we have a single insn
doing broadcast from the first element, but don't have one for broadcast
of 2nd+ element (so for d->perm[0] we must return false), but for
TARGET_AVX512F && !TARGET_AVX512BW we don't even have support for that other
broadcast. V64QImode case was just added to the AVX2 cases which had
gcc_assert (!TARGET_AVX2 || d->perm[0]);
but for V64QImode we actually need
gcc_assert (!TARGET_AVX512BW || d->perm[0]);
2021-08-14 Jakub Jelinek <jakub@redhat.com>
PR target/101896
* config/i386/i386-expand.c (expand_vec_perm_broadcast_1)
<case E_V64QImode>: For this mode assert
!TARGET_AVX512BW || d->perm[0] rather than !TARGET_AVX2 || d->perm[0].
* gcc.target/i386/avx512f-pr101896.c: New test.
Diff:
---
gcc/config/i386/i386-expand.c | 5 ++++-
gcc/testsuite/gcc.target/i386/avx512f-pr101896.c | 5 +++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c
index a652b25f534..4d7349cfc7c 100644
--- a/gcc/config/i386/i386-expand.c
+++ b/gcc/config/i386/i386-expand.c
@@ -20474,7 +20474,6 @@ expand_vec_perm_broadcast_1 (struct expand_vec_perm_d *d)
emit_move_insn (d->target, gen_lowpart (d->vmode, dest));
return true;
- case E_V64QImode:
case E_V32QImode:
case E_V16HImode:
case E_V8SImode:
@@ -20484,6 +20483,10 @@ expand_vec_perm_broadcast_1 (struct expand_vec_perm_d *d)
gcc_assert (!TARGET_AVX2 || d->perm[0]);
return false;
+ case E_V64QImode:
+ gcc_assert (!TARGET_AVX512BW || d->perm[0]);
+ return false;
+
case E_V32HImode:
gcc_assert (!TARGET_AVX512BW);
return false;
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr101896.c b/gcc/testsuite/gcc.target/i386/avx512f-pr101896.c
new file mode 100644
index 00000000000..c1805cccac4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-pr101896.c
@@ -0,0 +1,5 @@
+/* PR target/101896 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f -mno-avx512bw" } */
+
+#include "../../gcc.dg/torture/vshuf-v64qi.c"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-14 9:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-14 9:48 [gcc r12-2907] i386: Fix ICE with V64QImode broadcast permutation with -mavx512f -mno-avx512bw 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).