Debian Codegraph @

gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.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 /* { dg-require-effective-target vect_early_break_hw } */
7 /* { dg-add-options vect_early_break } */
8
9 #include "tsvc.h"
10
11 real_t s332(struct args_t * func_args)
12 {
13 // search loops
14 // first value greater than threshold
15
16 int t = *(int*)func_args->arg_info;
17
18 initialise_arrays(__func__);
19
20 int index;
21 real_t value;
22 real_t chksum;
23 for (int nl = 0; nl < iterations; nl++) {
24 index = -2;
25 value = -1.;
26 for (int i = 0; i < LEN_1D; i++) {
27 if (a[i] > t) {
28 index = i;
29 value = a[i];
30 goto L20;
31 }
32 }
33 L20:
34 chksum = value + (real_t) index;
35 dummy(a, b, c, d, e, aa, bb, cc, chksum);
36 }
37
38 return value;
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(&s332, "s332", &s1);
50
51 return 0;
52 }
53
54 /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! vect_early_break } } } } */