gcc/testsuite/gcc.dg/tree-ssa/pr52631.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fno-tree-forwprop -fdump-tree-fre1-details" } */ |
| 3 | |
| 4 | unsigned f(unsigned a) |
| 5 | { |
| 6 | #if __SIZEOF_INT__ == 2 |
| 7 | unsigned b = a >> 15; |
| 8 | #else |
| 9 | unsigned b = a >> 31; |
| 10 | #endif |
| 11 | return b&1; |
| 12 | } |
| 13 | |
| 14 | /* We want to verify that we replace the b & 1 with b. */ |
| 15 | /* { dg-final { scan-tree-dump-times "Replaced b_\[0-9\]+ & 1 with b_\[0-9\]+ in" 1 "fre1"} } */ |
| 16 | |
| 17 |