| 1 |
/* This file is distributed under the University of Illinois Open Source |
| 2 |
License. See license.txt for details. */ |
| 3 |
|
| 4 |
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */ |
| 5 |
/* { dg-require-effective-target vect_float } */ |
| 6 |
|
| 7 |
/* This test requires +-Inf and NaN, so disable finite-math-only */ |
| 8 |
/* { dg-additional-options "-fno-finite-math-only" } */ |
| 9 |
|
| 10 |
#include "tsvc.h" |
| 11 |
|
| 12 |
real_t s1281(struct args_t * func_args) |
| 13 |
{ |
| 14 |
// crossing thresholds |
| 15 |
// index set splitting |
| 16 |
// reverse data access |
| 17 |
|
| 18 |
initialise_arrays(__func__); |
| 19 |
|
| 20 |
real_t x; |
| 21 |
for (int nl = 0; nl < 4*iterations; nl++) { |
| 22 |
for (int i = 0; i < LEN_1D; i++) { |
| 23 |
x = b[i]*c[i] + a[i]*d[i] + e[i]; |
| 24 |
a[i] = x-(real_t)1.0; |
| 25 |
b[i] = x; |
| 26 |
} |
| 27 |
dummy(a, b, c, d, e, aa, bb, cc, 0.); |
| 28 |
} |
| 29 |
|
| 30 |
return calc_checksum(__func__); |
| 31 |
} |
| 32 |
|
| 33 |
int main (int argc, char **argv) |
| 34 |
{ |
| 35 |
int n1 = 1; |
| 36 |
int n3 = 1; |
| 37 |
int* ip; |
| 38 |
real_t s1,s2; |
| 39 |
init(&ip, &s1, &s2); |
| 40 |
|
| 41 |
run(&s1281, "s1281", NULL); |
| 42 |
|
| 43 |
return 0; |
| 44 |
} |
| 45 |
|
| 46 |
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ |