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
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
vect
/
vect-cond-13.c
blob
addb2b7a284a3504ee01ecb60937ba27e383cd3a
1
#include
"tree-vect.h"
2
3
int
a
[
1024
];
4
int
b
[
1024
];
5
6
int
7
foo
()
8
{
9
int
tem
;
10
for
(
int
i
=
0
;
i
<
1024
; ++
i
)
11
{
12
if
(
a
[
i
] <
0
)
13
tem
= -
a
[
i
] -
1
;
14
else
15
tem
=
a
[
i
];
16
b
[
i
] =
tem
+
10
;
17
}
18
return
tem
;
19
}
20
21
int
main
()
22
{
23
check_vect
();
24
25
for
(
int
i
=
0
;
i
<
1024
; ++
i
)
26
{
27
a
[
i
] =
i
-
333
;
28
__asm__
volatile
(
""
:::
"memory"
);
29
}
30
int
res
=
foo
();
31
if
(
res
!=
1023
-
333
)
32
abort
();
33
return
0
;
34
}
35
36
/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { target vect_condition } } } */