This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix memory alignment on AVX512VL masked floating point stores (PR target/69198)
- From: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, gcc-patches at gcc dot gnu dot org, HJ <hjl dot tools at gmail dot com>
- Date: Tue, 12 Jan 2016 16:12:49 +0300
- Subject: Re: [PATCH] Fix memory alignment on AVX512VL masked floating point stores (PR target/69198)
- Authentication-results: sourceware.org; auth=none
- References: <20160108202056 dot GG18720 at tucnak dot redhat dot com>
Hello Jakub
On 08 Jan 21:20, Jakub Jelinek wrote:
> Hi!
>
> This patch fixes
> FAIL: gcc.target/i386/avx512vl-vmovapd-1.c scan-assembler-times vmovapd[ \\\\t]+[^{\\n]*%xmm[0-9]+[^\\n]*\\\\){%k[1-7]}(?:\\n|[ \\\\t]+#) 1
> FAIL: gcc.target/i386/avx512vl-vmovapd-1.c scan-assembler-times vmovapd[ \\\\t]+[^{\\n]*%ymm[0-9]+[^\\n]*\\\\){%k[1-7]}(?:\\n|[ \\\\t]+#) 1
> FAIL: gcc.target/i386/avx512vl-vmovaps-1.c scan-assembler-times vmovaps[ \\\\t]+[^{\\n]*%xmm[0-9]+[^\\n]*\\\\){%k[1-7]}(?:\\n|[ \\\\t]+#) 1
> FAIL: gcc.target/i386/avx512vl-vmovaps-1.c scan-assembler-times vmovaps[ \\\\t]+[^{\\n]*%ymm[0-9]+[^\\n]*\\\\){%k[1-7]}(?:\\n|[ \\\\t]+#) 1
> regressions that were introduced recently by fixing up the masked store check for misalignment.
> The problem is that for v2df/v4df/v4sf/v8sf masked stores ix86_expand_special_args_builtin
> failed to set aligned_mem and thus didn't set correct memory alignment.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
Followed you discussion w/ HJ.
I think that metioned intrinsics should assume proper alignement and this
agrees with SDM.
So, your patch is ok for main trunk.
--
Thanks, K
>
> 2016-01-08 Jakub Jelinek <jakub@redhat.com>
>
> PR target/69198
> * config/i386/i386.c (ix86_expand_special_args_builtin): Ensure
> aligned_mem is properly set for AVX512-VL floating point masked
> stores.
>
> --- gcc/config/i386/i386.c.jj 2016-01-08 07:31:11.000000000 +0100
> +++ gcc/config/i386/i386.c 2016-01-08 18:16:21.030354042 +0100
> @@ -39776,7 +39776,11 @@ ix86_expand_special_args_builtin (const
> memory = 0;
> break;
> case VOID_FTYPE_PV8DF_V8DF_UQI:
> + case VOID_FTYPE_PV4DF_V4DF_UQI:
> + case VOID_FTYPE_PV2DF_V2DF_UQI:
> case VOID_FTYPE_PV16SF_V16SF_UHI:
> + case VOID_FTYPE_PV8SF_V8SF_UQI:
> + case VOID_FTYPE_PV4SF_V4SF_UQI:
> case VOID_FTYPE_PV8DI_V8DI_UQI:
> case VOID_FTYPE_PV4DI_V4DI_UQI:
> case VOID_FTYPE_PV2DI_V2DI_UQI:
> @@ -39834,10 +39838,6 @@ ix86_expand_special_args_builtin (const
> case VOID_FTYPE_PV16QI_V16QI_UHI:
> case VOID_FTYPE_PV32QI_V32QI_USI:
> case VOID_FTYPE_PV64QI_V64QI_UDI:
> - case VOID_FTYPE_PV4DF_V4DF_UQI:
> - case VOID_FTYPE_PV2DF_V2DF_UQI:
> - case VOID_FTYPE_PV8SF_V8SF_UQI:
> - case VOID_FTYPE_PV4SF_V4SF_UQI:
> nargs = 2;
> klass = store;
> /* Reserve memory operand for target. */
>
> Jakub