This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix memory alignment on AVX512VL masked floating point stores (PR target/69198)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]