2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx256-unaligned-store-6.c
bloba0de7a56f638cb84dfc41ec83d39bb43521af8d4
1 /* { dg-do run } */
2 /* { dg-require-effective-target avx } */
3 /* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-store" } */
5 #include "avx-check.h"
7 #define N 4
9 double a[N] = { 24.43, 68.346, 43.35, 546.46 };
10 double b[N+3];
11 double c[N+3];
13 void
14 foo (void)
16 int i;
18 for (i = 0; i < N; i++)
19 b[i+3] = a[i] * 2;
22 __attribute__ ((noinline))
23 double
24 bar (double x)
26 return x * 2;
29 void
30 avx_test (void)
32 int i;
34 foo ();
36 for (i = 0; i < N; i++)
37 c[i+3] = bar (a[i]);
39 for (i = 0; i < N; i++)
40 if (b[i+3] != c[i+3])
41 abort ();