1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-O2" } */
3
test_1(long x,int n)4 long test_1 (long x, int n)
5 {
6 x &= ~((long)0x01 << n);
7
8 return x;
9 }
10
11 /* { dg-final { scan-assembler "btr" } } */
12
test_2(long x,int n)13 long test_2 (long x, int n)
14 {
15 x |= ((long)0x01 << n);
16
17 return x;
18 }
19
20 /* { dg-final { scan-assembler "bts" } } */
21
test_3(long x,int n)22 long test_3 (long x, int n)
23 {
24 x ^= ((long)0x01 << n);
25
26 return x;
27 }
28
29 /* { dg-final { scan-assembler "btc" } } */
30