testsuite: Revert to the original version of pr100056.c
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr113281-4.c
blob10fbc0e8405cd83a1d064a5beec00713333fe389
1 /* { dg-do compile } */
3 #define N 128
5 short x[N];
6 short y[N];
8 void
9 f1 (void)
11 for (int i = 0; i < N; ++i)
12 x[i] >>= (y[i] & 15);
15 void
16 f2 (void)
18 for (int i = 0; i < N; ++i)
19 x[i] >>= ((y[i] & 7) + 8);
22 void
23 f3 (void)
25 for (int i = 0; i < N; ++i)
26 x[i] >>= ((y[i] & 7) ^ 11);
29 void
30 f4 (void)
32 for (int i = 0; i < N; ++i)
33 x[i] >>= (y[i] < 15 ? y[i] : 15);
36 void
37 f5 (void)
39 for (int i = 0; i < N; ++i)
40 x[i] >>= (y[i] < 15 ? y[i] : 1);
43 void
44 f6 (void)
46 for (int i = 0; i < N; ++i)
47 x[i] = 32768 >> (y[i] & 15);
50 /* { dg-final { scan-tree-dump {:11:[^\n]+can narrow to signed:16 without loss [^\n]+>>} "vect" } } */
51 /* { dg-final { scan-tree-dump {:18:[^\n]+can narrow to signed:16 without loss [^\n]+>>} "vect" } } */
52 /* { dg-final { scan-tree-dump {:25:[^\n]+can narrow to signed:16 without loss [^\n]+>>} "vect" } } */
53 /* { dg-final { scan-tree-dump {:32:[^\n]+can narrow to signed:16 without loss [^\n]+>>} "vect" } } */
54 /* { dg-final { scan-tree-dump {:39:[^\n]+can narrow to signed:16 without loss [^\n]+>>} "vect" } } */
55 /* { dg-final { scan-tree-dump {can narrow to unsigned:16 without loss [^\n]+>>} "vect" } } */