* gcc.target/i386/i386.exp
authorJakub Jelinek <jakub@redhat.com>
Sun, 31 Dec 2017 23:49:42 +0000 (00:49 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sun, 31 Dec 2017 23:49:42 +0000 (00:49 +0100)
(check_effective_target_avx512vpopcntdqvl): New proc.
* gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c: Use
avx512vpopcntdqvl effective target rather than avx512vpopcntdq.
* gcc.target/i386/avx512vpopcntdqvl-vpopcntq-1.c: Likewise.

From-SVN: r256050

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c
gcc/testsuite/gcc.target/i386/avx512vpopcntdqvl-vpopcntq-1.c
gcc/testsuite/gcc.target/i386/i386.exp

index 76f13b5..43f137e 100644 (file)
@@ -1,3 +1,11 @@
+2018-01-01  Jakub Jelinek  <jakub@redhat.com>
+
+       * gcc.target/i386/i386.exp
+       (check_effective_target_avx512vpopcntdqvl): New proc.
+       * gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c: Use
+       avx512vpopcntdqvl effective target rather than avx512vpopcntdq.
+       * gcc.target/i386/avx512vpopcntdqvl-vpopcntq-1.c: Likewise.
+
 2017-12-30  Tom de Vries  <tom@codesourcery.com>
 
        PR testsuite/83612
index 95e43ce..709cd21 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do run } */
 /* { dg-options "-O2 -mavx512vpopcntdq -mavx512bw -mavx512vl" } */
 /* { dg-require-effective-target avx512vl } */
-/* { dg-require-effective-target avx512vpopcntdq } */
+/* { dg-require-effective-target avx512vpopcntdqvl } */
 /* { dg-require-effective-target avx512bw } */
 
 #define AVX512VL
index 6e110e1..b7f0e91 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do run } */
 /* { dg-options "-O2 -mavx512vl -mavx512vpopcntdq" } */
 /* { dg-require-effective-target avx512vl } */
-/* { dg-require-effective-target avx512vpopcntdq } */
+/* { dg-require-effective-target avx512vpopcntdqvl } */
 
 #define AVX512VL
 #define AVX512F_LEN 256
index 79d97c3..226a70e 100644 (file)
@@ -410,6 +410,19 @@ proc check_effective_target_avx512vpopcntdq { } {
     } "-mavx512vpopcntdq" ]
 }
 
+# Return 1 if 128 or 256-bit avx512_vpopcntdq instructions can be compiled.
+proc check_effective_target_avx512vpopcntdqvl { } {
+    return [check_no_compiler_messages avx512vpopcntdqvl object {
+        typedef int __v8si __attribute__ ((__vector_size__ (32)));
+
+        __v8si
+        _mm256_popcnt_epi32 (__v8si __A)
+        {
+            return (__v8si) __builtin_ia32_vpopcountd_v8si ((__v8si) __A);
+        }
+    } "-mavx512vpopcntdq -mavx512vl" ]
+}
+
 # Return 1 if gfni instructions can be compiled.
 proc check_effective_target_gfni { } {
     return [check_no_compiler_messages gfni object {