repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
gcc/
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
vect
/
cond-reduc-1.c
blob
981f6b0648002d10c09aac8050958a5cc2cff318
1
/* { dg-do compile } */
2
/* { dg-require-effective-target vect_int } */
3
4
#define N 512
5
int
a
[
N
];
6
int
foo
()
7
{
8
int
i
,
res
=
0
;
9
for
(
i
=
0
;
i
<
N
;
i
++)
10
{
11
if
(
a
[
i
] !=
0
)
12
res
+=
1
;
13
}
14
return
res
;
15
}
16
17
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
18
/* { dg-final { cleanup-tree-dump "vect" } } */
19