Debian Codegraph @

gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s122.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 s122(struct args_t * func_args)
10 {
11 // induction variable recognition
12 // variable lower and upper bound, and stride
13 // reverse data access and jump in data access
14
15 struct{int a;int b;} * x = func_args->arg_info;
16 int n1 = x->a;
17 int n3 = x->b;
18
19 initialise_arrays(__func__);
20
21 int j, k;
22 for (int nl = 0; nl < iterations; nl++) {
23 j = 1;
24 k = 0;
25 for (int i = n1-1; i < LEN_1D; i += n3) {
26 k += j;
27 a[i] += b[LEN_1D - k];
28 }
29 dummy(a, b, c, d, e, aa, bb, cc, 0.);
30 }
31
32 return calc_checksum(__func__);
33 }
34
35 int main (int argc, char **argv)
36 {
37 int n1 = 1;
38 int n3 = 1;
39 int* ip;
40 real_t s1,s2;
41 init(&ip, &s1, &s2);
42
43 run(&s122, "s122", &(struct{int a;int b;}){n1, n3});
44
45 return 0;
46 }
47
48 /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */