blob: c08f1e2f5c0a14b55de7cd070c8c94fb1d872e06 (
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
29
30
31
32
33
34
35
36
37
|
/* { dg-require-effective-target vect_int } */
/* { dg-require-effective-target vect_condition } */
#include <stdarg.h>
#include "tree-vect.h"
#define N 256
int a[N] = {0};
__attribute__ ((noinline))
int foo ()
{
int i, res = 0;
for (i = 0; i < N; i++)
{
if (a[i] != 0)
res = 1;
}
return res;
}
int main (void)
{
int i, res;
check_vect ();
if ((res = foo ()) != 0)
abort ();
a[34] = 101;
a[85] = 9;
if ((res = foo ()) != 1)
abort ();
return 0;
}
/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } */
|