Debian Codegraph @

gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vbor.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 vbor(struct args_t * func_args)
10 {
11 // control loops
12 // basic operations rates, isolate arithmetic from memory traffic
13 // all combinations of three, 59 flops for 6 loads and 1 store.
14
15 initialise_arrays(__func__);
16
17 real_t a1, b1, c1, d1, e1, f1;
18 for (int nl = 0; nl < iterations*10; nl++) {
19 for (int i = 0; i < LEN_2D; i++) {
20 a1 = a[i];
21 b1 = b[i];
22 c1 = c[i];
23 d1 = d[i];
24 e1 = e[i];
25 f1 = aa[0][i];
26 a1 = a1 * b1 * c1 + a1 * b1 * d1 + a1 * b1 * e1 + a1 * b1 * f1 +
27 a1 * c1 * d1 + a1 * c1 * e1 + a1 * c1 * f1 + a1 * d1 * e1
28 + a1 * d1 * f1 + a1 * e1 * f1;
29 b1 = b1 * c1 * d1 + b1 * c1 * e1 + b1 * c1 * f1 + b1 * d1 * e1 +
30 b1 * d1 * f1 + b1 * e1 * f1;
31 c1 = c1 * d1 * e1 + c1 * d1 * f1 + c1 * e1 * f1;
32 d1 = d1 * e1 * f1;
33 x[i] = a1 * b1 * c1 * d1;
34 }
35 dummy(a, b, c, d, e, aa, bb, cc, 0.);
36 }
37
38 return calc_checksum(__func__);
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(&vbor, "vbor", NULL);
50
51 return 0;
52 }
53
54 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */