libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / tsvc / vect-tsvc-s332.c
blob0d55d0dd67c3b2e53c8cc4a44428f9cee5a1cd5d
1 /* This file is distributed under the University of Illinois Open Source
2 License. See license.txt for details. */
4 /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
5 /* { dg-require-effective-target vect_float } */
6 /* { dg-add-options vect_early_break } */
8 #include "tsvc.h"
10 real_t s332(struct args_t * func_args)
12 // search loops
13 // first value greater than threshold
15 int t = *(int*)func_args->arg_info;
17 initialise_arrays(__func__);
19 int index;
20 real_t value;
21 real_t chksum;
22 for (int nl = 0; nl < iterations; nl++) {
23 index = -2;
24 value = -1.;
25 for (int i = 0; i < LEN_1D; i++) {
26 if (a[i] > t) {
27 index = i;
28 value = a[i];
29 goto L20;
32 L20:
33 chksum = value + (real_t) index;
34 dummy(a, b, c, d, e, aa, bb, cc, chksum);
37 return value;
40 int main (int argc, char **argv)
42 int n1 = 1;
43 int n3 = 1;
44 int* ip;
45 real_t s1,s2;
46 init(&ip, &s1, &s2);
48 run(&s332, "s332", &s1);
50 return 0;
53 /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! vect_early_break } } } } */