blob: d39aa340a586544855c77daf7670cfdd91032811 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* { dg-do run } */
/* { dg-options "-O3 -ftree-vectorize -fcilkplus -w" } */
int a[100];
int
main (int argc, char **argv)
{
int i;
for (i = 0; i < 100; i++)
if (argc == 1)
a[i] = 10;
else
a[i] = argc * 5;
#pragma simd vectorlength(4, sizeof (int) == 4 ? 4 : 8, 8)
for (i = 0; i < 100; i++)
a[i] += 1;
for (i = 0; i < 100; i++)
if (a[i] != 11)
return 1;
return 0;
}
|