* [PATCH] i386: Fix movv2qi_internal xmm reg to xmm reg move for AVX512FP16 [PR105139]
@ 2022-04-05 19:05 Uros Bizjak
0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2022-04-05 19:05 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 398 bytes --]
2022-04-05 Uroš Bizjak <ubizjak@gmail.com>
gcc/ChangeLog:
PR target/105139
* config/i386/mmx.md (*movv2qi_internal):
Change insn mode of alternative 5 to HF for TARGET_AVX512FP16.
gcc/testsuite/ChangeLog:
PR target/105139
* gcc.target/i386/pr105139.c: New test.
Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
Pushed to master.
Uros.
[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 1006 bytes --]
diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
index 29d470bdef2..197f19e4b1a 100644
--- a/gcc/config/i386/mmx.md
+++ b/gcc/config/i386/mmx.md
@@ -462,7 +462,7 @@ (define_insn "*movv2qi_internal"
(const_string "TI"))
(eq_attr "alternative" "5")
(cond [(match_test "TARGET_AVX512FP16")
- (const_string "HI")
+ (const_string "HF")
(match_test "TARGET_AVX")
(const_string "TI")
(ior (not (match_test "TARGET_SSE2"))
diff --git a/gcc/testsuite/gcc.target/i386/pr105139.c b/gcc/testsuite/gcc.target/i386/pr105139.c
new file mode 100644
index 00000000000..06e4797dfca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr105139.c
@@ -0,0 +1,17 @@
+/* { dg-do assemble { target avx512fp16 } } */
+/* { dg-options "-O3 -march=sapphirerapids" } */
+
+extern long c[];
+extern int d[];
+long a;
+
+long e (long f)
+{
+ return f < a ? f : a;
+}
+
+void g (void)
+{
+ for (signed b = 0; b < 4028643; b++)
+ d[b] = e ((char) (~c[b]));
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-05 19:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05 19:05 [PATCH] i386: Fix movv2qi_internal xmm reg to xmm reg move for AVX512FP16 [PR105139] Uros Bizjak
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).