Hi!

I've noticed these two tests FAIL execution with -fstack-protector-strong,
without it we are just lucky.  _mm512_stream_* requires the destination to
be 64-byte aligned and without stack protector the s vars were allocated
next to res and ensured the right alignment, but with
-fstack-protector-strong, they go into different phases (res being an array
so goes into phase 1 and s being a union/record containing arrays goes into
phase 2) and so res remained only 8-byte aligned.

Fixed thusly, tested on x86_64-linux, committed to trunk as obvious.

2019-12-10  Jakub Jelinek  <ja...@redhat.com>

        * gcc.target/i386/avx512f-vmovntpd-2.c: Ensure res is 64-byte aligned.
        * gcc.target/i386/avx512f-vmovntps-2.c: Likewise.

--- gcc/testsuite/gcc.target/i386/avx512f-vmovntpd-2.c.jj       2013-12-31 
12:51:09.564632909 +0100
+++ gcc/testsuite/gcc.target/i386/avx512f-vmovntpd-2.c  2019-12-10 
09:53:02.213679644 +0100
@@ -8,7 +8,7 @@ void static
 avx512f_test (void)
 {
   union512d s;
-  double res[8];
+  double res[8] __attribute__((aligned (64)));
 
   s.x = _mm512_set_pd (-39578.467285, 4294967295.1, -7856.342941, 0,
                       85632.783567, 1234.9999, 47563.234215, -1.07);
--- gcc/testsuite/gcc.target/i386/avx512f-vmovntps-2.c.jj       2013-12-31 
12:51:09.555632955 +0100
+++ gcc/testsuite/gcc.target/i386/avx512f-vmovntps-2.c  2019-12-10 
09:53:19.096418920 +0100
@@ -8,7 +8,7 @@ void static
 avx512f_test (void)
 {
   union512 s;
-  float res[16];
+  float res[16] __attribute__((aligned (64)));
 
   s.x = _mm512_set_ps (-39578.467285, 4294967295.1, -7856.342941, 0,
                       85632.783567, 1234.9999, 47563.234215, -1.07,

        Jakub

Reply via email to