| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-ftree-slp-vectorize -funroll-loops" } */ |
| 3 |
/* { dg-skip-if "" { *-*-* } { "-O0" } } */ |
| 4 |
|
| 5 |
#include <stdio.h> |
| 6 |
#include <stdlib.h> |
| 7 |
#define N 4 |
| 8 |
volatile float f[N]; |
| 9 |
int x[N] __attribute__((aligned(8))); |
| 10 |
int main() { |
| 11 |
int i; |
| 12 |
x[0] = -1; |
| 13 |
x[1] = 2; |
| 14 |
x[2] = -2; |
| 15 |
x[3] = 2; |
| 16 |
|
| 17 |
for (i=0;i<N;++i){ |
| 18 |
f[i] = x[i]; |
| 19 |
} |
| 20 |
|
| 21 |
if (f[0] != -1.0f) { |
| 22 |
abort(); |
| 23 |
} |
| 24 |
|
| 25 |
if (f[1] != 2.0f) { |
| 26 |
abort(); |
| 27 |
} |
| 28 |
|
| 29 |
if (f[2] != -2.0f) { |
| 30 |
abort(); |
| 31 |
} |
| 32 |
|
| 33 |
if (f[3] != 2.0f) { |
| 34 |
abort(); |
| 35 |
} |
| 36 |
|
| 37 |
return 0; |
| 38 |
} |