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
2018-01-16 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
vect
/
vect-cond-reduc-1.c
blob
033aafa0f97b124ff7bfdfc45417b54e57d3460c
1
/* { dg-do compile } */
2
/* { dg-require-effective-target vect_int } */
3
/* { dg-require-effective-target vect_condition } */
4
5
#define N 512
6
int
a
[
N
];
7
int
foo
()
8
{
9
int
i
,
res
=
0
;
10
for
(
i
=
0
;
i
<
N
;
i
++)
11
{
12
if
(
a
[
i
] !=
0
)
13
res
+=
1
;
14
}
15
return
res
;
16
}
17
18
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
19