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
testsuite: Revert to the original version of pr100056.c
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
vect
/
no-scevccp-outer-9a.c
blob
96ffb4ce7b4a8a06cb6966acc15924512ad00f31
1
/* { dg-require-effective-target vect_int } */
2
3
#include <stdarg.h>
4
#include
"tree-vect.h"
5
6
#define N 40
7
8
int
a
[
N
];
9
10
__attribute__
((
noinline
))
int
11
foo
(
int
n
){
12
int
i
,
j
;
13
int
sum
;
14
15
if
(
n
<=
0
)
16
return
0
;
17
18
for
(
i
=
0
;
i
<
N
;
i
++) {
19
sum
=
0
;
20
j
=
0
;
21
do
{
22
sum
+=
j
;
23
}
while
(++
j
<
n
);
24
a
[
i
] =
sum
;
25
}
26
}
27
28
int
main
(
void
)
29
{
30
int
i
,
j
;
31
int
sum
;
32
33
check_vect
();
34
35
for
(
i
=
0
;
i
<
N
;
i
++)
36
a
[
i
] =
i
;
37
38
foo
(
N
);
39
40
/* check results: */
41
#pragma GCC novector
42
for
(
i
=
0
;
i
<
N
;
i
++)
43
{
44
sum
=
0
;
45
for
(
j
=
0
;
j
<
N
;
j
++)
46
sum
+=
j
;
47
if
(
a
[
i
] !=
sum
)
48
abort
();
49
}
50
51
return
0
;
52
}
53
54
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" } } */