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: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 8 Jan 2016 12:28:43 -0800
- 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>
On Fri, Jan 8, 2016 at 12:20 PM, Jakub Jelinek <jakub@redhat.com> 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?
>
>
gcc.target/i386/avx512vl-vmovapd-1.c has
---
include <immintrin.h>
double *p;
volatile __m256d yy, y2;
volatile __m128d xx, x2;
volatile __mmask8 m;
void extern
avx512vl_test (void)
{
yy = _mm256_mask_mov_pd (yy, m, y2);
xx = _mm_mask_mov_pd (xx, m, x2);
yy = _mm256_maskz_mov_pd (m, y2);
xx = _mm_maskz_mov_pd (m, x2);
yy = _mm256_mask_load_pd (yy, m, p);
xx = _mm_mask_load_pd (xx, m, p);
yy = _mm256_maskz_load_pd (m, p);
xx = _mm_maskz_load_pd (m, p);
_mm256_mask_store_pd (p, m, yy);
_mm_mask_store_pd (p, m, xx);
}
---
'p' is misaligned. Why should we change its alignment?
H.J.