2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr46091-5.c
blob301702991048e089880419993cd3b47c421cb61d
1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-O2" } */
4 long test_1 (long x, int n)
6 x &= ~((long)0x01 << n);
8 return x;
11 /* { dg-final { scan-assembler "btr" } } */
13 long test_2 (long x, int n)
15 x |= ((long)0x01 << n);
17 return x;
20 /* { dg-final { scan-assembler "bts" } } */
22 long test_3 (long x, int n)
24 x ^= ((long)0x01 << n);
26 return x;
29 /* { dg-final { scan-assembler "btc" } } */