Debian Codegraph @

gcc/testsuite/gcc.dg/pr101955.c

raw
1 /* { dg-do compile { target int32 } } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3
4 __attribute__((noipa)) int
5 t1 (int x)
6 {
7 int y = x << 31;
8 int z = y >> 31;
9 return z;
10 }
11
12 __attribute__((noipa)) int
13 t2 (unsigned int x)
14 {
15 int y = x << 31;
16 int z = y >> 31;
17 return z;
18 }
19
20 __attribute__((noipa)) int
21 t3 (int x)
22 {
23 return (x << 31) >> 31;
24 }
25
26 __attribute__((noipa)) int
27 t4 (int x)
28 {
29 return (x << 24) >> 24;
30 }
31
32 __attribute__((noipa)) int
33 t5 (int x)
34 {
35 return (x << 16) >> 16;
36 }
37
38 __attribute__((noipa)) long long
39 t6 (long long x)
40 {
41 return (x << 63) >> 63;
42 }
43
44 __attribute__((noipa)) long long
45 t7 (long long x)
46 {
47 return (x << 56) >> 56;
48 }
49
50 __attribute__((noipa)) long long
51 t8 (long long x)
52 {
53 return (x << 48) >> 48;
54 }
55
56 __attribute__((noipa)) long long
57 t9 (long long x)
58 {
59 return (x << 32) >> 32;
60 }
61
62 /* { dg-final { scan-tree-dump-not " >> " "optimized" } } */
63 /* { dg-final { scan-tree-dump-not " << " "optimized" } } */