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.
(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"))
--- /dev/null
+/* { 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]));
+}