]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/tree-ssa/phi-opt-25b.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / phi-opt-25b.c
CommitLineData
8702ab14
AP
1/* PR tree-optimization/109702 */
2/* { dg-do compile } */
3/* { dg-options "-O2 -fdump-tree-optimized" } */
4
5/* Test to make sure unrelated arguments and comparisons
6 don't get optimized incorrectly. */
7
8unsigned short test_bswap16(unsigned short x, unsigned short y)
9{
10 return x ? __builtin_bswap16(y) : 0;
11}
12
13unsigned int test_bswap32(unsigned int x, unsigned int y)
14{
15 return x ? __builtin_bswap32(y) : 0;
16}
17
18unsigned long long test_bswap64(unsigned long long x, unsigned long long y)
19{
20 return x ? __builtin_bswap64(y) : 0;
21}
22
23int test_clrsb(int x, int y)
24{
25 return x ? __builtin_clrsb(y) : (__SIZEOF_INT__*8-1);
26}
27
28int test_clrsbl(long x, long y)
29{
30 return x ? __builtin_clrsbl(y) : (__SIZEOF_LONG__*8-1);
31}
32
33int test_clrsbll(long long x, long long y)
34{
35 return x ? __builtin_clrsbll(y) : (__SIZEOF_LONG_LONG__*8-1);
36}
37
38int test_parity(unsigned int x, unsigned int y)
39{
40 return x ? __builtin_parity(y) : 0;
41}
42
43int test_parityl(unsigned long x, unsigned long y)
44{
45 return x ? __builtin_parityl(y) : 0;
46}
47
48int test_parityll(unsigned long long x, unsigned long long y)
49{
50 return x ? __builtin_parityll(y) : 0;
51}
52
53int test_popcount(unsigned int x, unsigned int y)
54{
55 return x ? __builtin_popcount(y) : 0;
56}
57
58int test_popcountl(unsigned long x, unsigned long y)
59{
60 return x ? __builtin_popcountl(y) : 0;
61}
62
63int test_popcountll(unsigned long long x, unsigned long long y)
64{
65 return x ? __builtin_popcountll(y) : 0;
66}
67
8c79b49c
AP
68/* 4 types of functions, each with 3 types and there are 2 goto each */
69/* { dg-final { scan-tree-dump-times "goto " 24 "optimized" } } */
64d90d06 70/* { dg-final { scan-tree-dump-times "x_..D. != 0" 12 "optimized" } } */