gcc/testsuite/c-c++-common/fold-masked-cmp-3.c
raw| 1 | /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ |
| 2 | /* { dg-options "-fdump-tree-original" } */ |
| 3 | |
| 4 | void foo (int *p, int x) |
| 5 | { |
| 6 | if ((x & 0xff) <= 7) |
| 7 | *p = 0; |
| 8 | } |
| 9 | |
| 10 | void bar (int *p, int x) |
| 11 | { |
| 12 | if ((x & 0xff) < 8) |
| 13 | *p = 0; |
| 14 | } |
| 15 | |
| 16 | /* { dg-final { scan-tree-dump-times "(x & .*) == 0" 2 "original" } } */ |