[PATCH] Enable GCC support for AVX512_VP2INTERSECT.
Hongtao Liu
crazylht@gmail.com
Wed Jun 26 10:09:00 GMT 2019
On Wed, Jun 26, 2019 at 5:21 PM Martin Liška <mliska@suse.cz> wrote:
>
> Hi.
>
> Started from r272668 I see:
>
> /tmp/ccqxwVjt.s: Assembler messages:
>
> /tmp/ccqxwVjt.s:22: Error: no such instruction: `vp2intersectq .LC1(%rip),%zmm0,%k0'
>
> /tmp/ccqxwVjt.s:33: Error: no such instruction: `vp2intersectd .LC3(%rip),%zmm0,%k0'
>
> compiler exited with status 1
> FAIL: gcc.target/i386/avx512vp2intersect-2intersect-1b.c (test for excess errors)
> Excess errors:
> /tmp/ccqxwVjt.s:22: Error: no such instruction: `vp2intersectq .LC1(%rip),%zmm0,%k0'
> /tmp/ccqxwVjt.s:33: Error: no such instruction: `vp2intersectd .LC3(%rip),%zmm0,%k0'
>
> You'll need a dg-require detection I guess.
Yes, thank you.
>
> Thanks,
> Martin
Patch:
Index: testsuite/gcc.target/i386/avx512vp2intersect-2intersect-1b.c
===================================================================
--- testsuite/gcc.target/i386/avx512vp2intersect-2intersect-1b.c
(revision 272668)
+++ testsuite/gcc.target/i386/avx512vp2intersect-2intersect-1b.c (working copy)
@@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -mavx512vp2intersect" } */
+/* { dg-require-effective-target "avx512vp2intersect" } */
#define AVX512F
#include <x86intrin.h>
Index: testsuite/gcc.target/i386/avx512vp2intersect-2intersectvl-1b.c
===================================================================
--- testsuite/gcc.target/i386/avx512vp2intersect-2intersectvl-1b.c
(revision 272668)
+++ testsuite/gcc.target/i386/avx512vp2intersect-2intersectvl-1b.c
(working copy)
@@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -mavx512vp2intersect -mavx512vl" } */
+/* { dg-require-effective-target "avx512vp2intersect" } */
#define AVX512F
#include <x86intrin.h>
Index: testsuite/lib/target-supports.exp
===================================================================
--- testsuite/lib/target-supports.exp (revision 272667)
+++ testsuite/lib/target-supports.exp (working copy)
@@ -7963,6 +7963,20 @@
} "-mavx512bw" ]
}
+# Return 1 if avx512vp2intersect instructions can be compiled.
+proc check_effective_target_avx512vp2intersect { } {
+ return [check_no_compiler_messages avx512vp2intersect object {
+ typedef int __v16si __attribute__ ((__vector_size__ (64)));
+ typedef short __mmask16;
+ void
+ _mm512_2intersect_epi32 (__v16si __A, __v16si __B, __mmask16 *__U,
+ __mmask16 *__M)
+ {
+ __builtin_ia32_2intersectd512 (__U, __M, (__v16si) __A, (__v16si) __B);
+ }
+ } "-mavx512vp2intersect" ]
+}
+
# Return 1 if avx512ifma instructions can be compiled.
proc check_effective_target_avx512ifma { } {
return [check_no_compiler_messages avx512ifma object {
--
BR,
Hongtao
More information about the Gcc-patches
mailing list