blob: 46d25526479df05290c47ec6dfd92c306dc69a93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* { dg-do compile } */
/* { dg-require-effective-target vect_simd_clones } */
int __attribute__ ((__simd__, const)) fn (int);
void test (int * __restrict__ a, int * __restrict__ b, int n)
{
for (int i = 0; i < n; ++i)
{
int a_;
if (b[i] > 0)
a_ = fn (b[i]);
else
a_ = b[i] + 5;
a[i] = a_;
}
}
/* { dg-final { scan-tree-dump-not {loop contains function calls or data references} "vect" } } */
/* The LTO test produces two dump files and we scan the wrong one. */
/* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
|