libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-switch-ifcvt-2.c
blobf0fcb43e17702492b4fb0e9bc89f0c90b3106fda
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
4 /* Check for cases currently not supported by switch tree if conversion. */
6 int
7 f1 (char *s)
9 int c = 0;
10 int i;
11 for (i = 0; i < 64; i++)
13 switch (*s)
15 case ',':
16 case '|':
17 c++;
18 break;
19 case '^':
20 c += 2;
21 break;
23 s++;
25 return c;
28 int
29 f2 (char *s)
31 int c = 0;
32 int i;
33 for (i = 0; i < 64; i++)
35 switch (*s)
37 case ',':
38 case '|':
39 c++;
40 /*fallthrough*/
41 default:
42 c+=2;
44 s++;
46 return c;
49 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */