Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / pr102738.c
blobcd58c258990937e780891dd5590578cdd14cf98c
1 /* PR tree-optimization/102738 */
2 /* { dg-options "-O2 -fdump-tree-evrp" } */
3 /* { dg-do compile { target int128 } } */
5 /* Remove arithmetic shift right when the LHS is known to be 0 or -1. */
7 int a1(__int128 f, int g)
9 /* Leaves f >> 127. */
10 return (f >> 127) >> g;
13 int a2(int f, int g)
15 /* Leaves f >> 31. */
16 return (f >> 31) >> g;
19 int a3(int f, int g)
21 if (f == 0 || f == -1)
22 return f >> g;
23 __builtin_unreachable();
26 int a4(int f, int g)
28 if (f == 0 || f == 1)
29 return (-f) >> g;
30 __builtin_unreachable();
33 int a5(int f, int g)
35 if (f == 0 || f == 1)
36 return (f-1) >> g;
37 return 0;
40 int a6(int f, int g)
42 if (f == 6 || f == 7)
43 return (f-7) >> g;
44 __builtin_unreachable();
47 /* { dg-final { scan-tree-dump-times " >> 127" 1 "evrp" } } */
48 /* { dg-final { scan-tree-dump-times " >> 31" 1 "evrp" } } */
49 /* { dg-final { scan-tree-dump-times " >> " 2 "evrp" } } */