This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix gcc.target/i386/avx512vpopcntdqvl-vpopcnt*-1.c FAILs
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Kirill Yukhin <kirill dot yukhin at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Julia Koval <julia dot koval at intel dot com>, Sebastian Peryt <sebastian dot peryt at intel dot com>
- Date: Sat, 30 Dec 2017 10:18:29 +0100
- Subject: Re: [PATCH] Fix gcc.target/i386/avx512vpopcntdqvl-vpopcnt*-1.c FAILs
- Authentication-results: sourceware.org; auth=none
- References: <20171228151837.GI1833@tucnak>
On Thu, Dec 28, 2017 at 4:18 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> Binutils had vpopcnt[dq] support since ~ January, but only for the 512-bit
> instructions, only in ~ October further support for the AVX512VPOPCNTDQ |
> AVX512VL instructions has been added. So, if one is using gas in between
> those two, these two tests FAIL to assemble.
>
> Fixed thusly (tests will be UNSUPPORTED not just with as that doesn't
> support vpopcnt[dq] at all, but also one that only supports
> vpopcnt[dq] %zmmN, ..., but should work with more recent binutils), regtested
> on x86_64-linux, ok for trunk?
>
> 2017-12-28 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.
>
> --- gcc/testsuite/gcc.target/i386/i386.exp.jj 2017-12-22 14:00:02.809638667 +0100
> +++ gcc/testsuite/gcc.target/i386/i386.exp 2017-12-28 16:09:25.702051624 +0100
> @@ -410,6 +410,19 @@ proc check_effective_target_avx512vpopcn
> } "-mavx512vpopcntdq" ]
> }
>
> +# Return 1 if avx512_vpopcntdq & avx512vl instructions can be compiled.
Perhaps we should say:
# Return 1 if variable-length avx512_vpopcntdq instructions can be compiled.
Uros.
> +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 {
> --- gcc/testsuite/gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c.jj 2017-12-22 14:00:02.785638973 +0100
> +++ gcc/testsuite/gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c 2017-12-28 16:12:20.427156937 +0100
> @@ -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
> --- gcc/testsuite/gcc.target/i386/avx512vpopcntdqvl-vpopcntq-1.c.jj 2017-12-22 14:00:02.784638986 +0100
> +++ gcc/testsuite/gcc.target/i386/avx512vpopcntdqvl-vpopcntq-1.c 2017-12-28 16:12:28.269161404 +0100
> @@ -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
>
> Jakub