From 1f01b45746bba314752b035821f4fca9dea21f78 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 1 Jan 2018 00:49:42 +0100 Subject: [PATCH] * 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. From-SVN: r256050 --- gcc/testsuite/ChangeLog | 8 ++++++++ .../gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c | 2 +- .../gcc.target/i386/avx512vpopcntdqvl-vpopcntq-1.c | 2 +- gcc/testsuite/gcc.target/i386/i386.exp | 13 +++++++++++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 76f13b5c343..43f137e089b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2018-01-01 Jakub Jelinek + + * 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 PR testsuite/83612 diff --git a/gcc/testsuite/gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c b/gcc/testsuite/gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c index 95e43ce1a98..709cd21e671 100644 --- a/gcc/testsuite/gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c @@ -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 diff --git a/gcc/testsuite/gcc.target/i386/avx512vpopcntdqvl-vpopcntq-1.c b/gcc/testsuite/gcc.target/i386/avx512vpopcntdqvl-vpopcntq-1.c index 6e110e1b565..b7f0e917128 100644 --- a/gcc/testsuite/gcc.target/i386/avx512vpopcntdqvl-vpopcntq-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512vpopcntdqvl-vpopcntq-1.c @@ -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 diff --git a/gcc/testsuite/gcc.target/i386/i386.exp b/gcc/testsuite/gcc.target/i386/i386.exp index 79d97c31530..226a70e2962 100644 --- a/gcc/testsuite/gcc.target/i386/i386.exp +++ b/gcc/testsuite/gcc.target/i386/i386.exp @@ -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 { -- 2.30.2