aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/fold-ior-5.c
blob: 8de56976da9d3d15832edc2b74ba639fe5229c5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

unsigned int test_ior(unsigned char i)
{
  return (i | (i<<16)) | ((i<<24) | (i<<8));
}

unsigned int test_xor(unsigned char i)
{
  return (i ^ (i<<16)) ^ ((i<<24) ^ (i<<8));
}

/* { dg-final { scan-tree-dump-not " \\^ " "optimized" } } */
/* { dg-final { scan-tree-dump-not " \\| " "optimized" } } */
/* { dg-final { scan-tree-dump-times " \\* 16843009" 2 "optimized" } } */