gcc/testsuite/gcc.target/i386/pr46091-5a.c
raw| 1 | /* { dg-do compile { target { ! ia32 } } } */ |
| 2 | /* { dg-options "-O2" } */ |
| 3 | |
| 4 | long test_1 (long x, int n) |
| 5 | { |
| 6 | n &= 0x3f; |
| 7 | |
| 8 | x &= ~((long)0x01 << n); |
| 9 | |
| 10 | return x; |
| 11 | } |
| 12 | |
| 13 | long test_2 (long x, int n) |
| 14 | { |
| 15 | n &= 0x3f; |
| 16 | |
| 17 | x |= ((long)0x01 << n); |
| 18 | |
| 19 | return x; |
| 20 | } |
| 21 | |
| 22 | long test_3 (long x, int n) |
| 23 | { |
| 24 | n &= 0x3f; |
| 25 | |
| 26 | x ^= ((long)0x01 << n); |
| 27 | |
| 28 | return x; |
| 29 | } |
| 30 | |
| 31 | /* { dg-final { scan-assembler-not "and\[lq\]\[ \t\]" } } */ |