[committed] Fix up i386/avx512f-vmovntp?-2.c tests
diff mbox series

Message ID 20191210090658.GW10088@tucnak
State New
Headers show
Series
  • [committed] Fix up i386/avx512f-vmovntp?-2.c tests
Related show

Commit Message

Jakub Jelinek Dec. 10, 2019, 9:06 a.m. UTC
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  <jakub@redhat.com>

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


	Jakub

Patch
diff mbox series

--- 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,