Debian Codegraph @

gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s318.c

raw
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 #include "tsvc.h"
8
9 real_t s318(struct args_t * func_args)
10 {
11 // reductions
12 // isamax, max absolute value, increments not equal to 1
13
14 int inc = *(int*)func_args->arg_info;
15
16 initialise_arrays(__func__);
17
18 int k, index;
19 real_t max, chksum;
20 for (int nl = 0; nl < iterations/2; nl++) {
21 k = 0;
22 index = 0;
23 max = ABS(a[0]);
24 k += inc;
25 for (int i = 1; i < LEN_1D; i++) {
26 if (ABS(a[k]) <= max) {
27 goto L5;
28 }
29 index = i;
30 max = ABS(a[k]);
31 L5:
32 k += inc;
33 }
34 chksum = max + (real_t) index;
35 dummy(a, b, c, d, e, aa, bb, cc, chksum);
36 }
37
38 return max + index + 1;
39 }
40
41 int main (int argc, char **argv)
42 {
43 int n1 = 1;
44 int n3 = 1;
45 int* ip;
46 real_t s1,s2;
47 init(&ip, &s1, &s2);
48
49 run(&s318, "s318", &n1);
50
51 return 0;
52 }
53
54 /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */