Debian Codegraph @

gcc/testsuite/gcc.target/i386/bt-7.c

raw
1 /* PR rtl-optimization/46235 */
2 /* { dg-do compile { target lp64 } } */
3 /* { dg-options "-O2 -mtune=core2" } */
4
5 unsigned char set1_lb (long long x, int y)
6 {
7 return (x & (1LL<<y)) != 0;
8 }
9
10 unsigned char set2_lb (long long x, int y)
11 {
12 return (x >> y) & 1;
13 }
14
15 unsigned char clr1_lb (long long x, int y)
16 {
17 return (x & (1LL<<y)) == 0;
18 }
19
20 unsigned char clr2_lb (long long x, int y)
21 {
22 return !((x >> y) & 1);
23 }
24
25 int clr1_lw (long long x, int y)
26 {
27 return (x & (1LL<<y)) == 0;
28 }
29
30 int clr2_lw (long long x, int y)
31 {
32 return !((x >> y) & 1);
33 }
34
35 long long clr1_bl (unsigned char x, int y)
36 {
37 return (x & (1<<y)) == 0;
38 }
39
40 long long clr2_bl (unsigned char x, int y)
41 {
42 return !((x >> y) & 1);
43 }
44
45 long long clr1_wl (int x, int y)
46 {
47 return (x & (1<<y)) == 0;
48 }
49
50 long long clr2_wl (int x, int y)
51 {
52 return !((x >> y) & 1);
53 }
54
55 long long clr1_ll (long long x, int y)
56 {
57 return (x & (1LL<<y)) == 0;
58 }
59
60 long long clr2_ll (long long x, int y)
61 {
62 return !((x >> y) & 1);
63 }
64
65 /* { dg-final { scan-assembler-times "bt\[lq\]\[ \t\]" 12 } } */
66 /* { dg-final { scan-assembler-not "sar\[lq\]\[ \t\]" } } */
67 /* { dg-final { scan-assembler-not "and\[lq\]\[ \t\]" } } */
68 /* { dg-final { scan-assembler-not "not\[lq\]\[ \t\]" } } */
69