libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / phi-opt-25a.c
blobfaecac59ee743f2e7086dd4c4458790960785ef2
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 unsigned short test_bswap16(unsigned short x)
6 if (x)
7 return __builtin_bswap16(x);
8 return 0;
11 unsigned int test_bswap32(unsigned int x)
13 if (x)
14 return __builtin_bswap32(x);
15 return 0;
18 unsigned long long test_bswap64(unsigned long long x)
20 if (x)
21 return __builtin_bswap64(x);
22 return 0;
25 int test_clrsb(int x)
27 if (x)
28 return __builtin_clrsb(x);
29 return (__SIZEOF_INT__*8-1);
32 int test_clrsbl(long x)
34 if (x)
35 return __builtin_clrsbl(x);
36 return (__SIZEOF_LONG__*8-1);
39 int test_clrsbll(long long x)
41 if (x)
42 return __builtin_clrsbll(x);
43 return (__SIZEOF_LONG_LONG__*8-1);
46 int test_parity(int x)
48 if (x)
49 return __builtin_parity(x);
50 return 0;
53 int test_parityl(long x)
55 if (x)
56 return __builtin_parityl(x);
57 return 0;
60 int test_parityll(long long x)
62 if (x)
63 return __builtin_parityll(x);
64 return 0;
67 int test_popcount(int x)
69 if (x)
70 return __builtin_popcount(x);
71 return 0;
74 int test_popcountl(long x)
76 if (x)
77 return __builtin_popcountl(x);
78 return 0;
81 int test_popcountll(long long x)
83 if (x)
84 return __builtin_popcountll(x);
85 return 0;
88 /* { dg-final { scan-tree-dump-not "goto" "optimized" } } */