aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ifcvt-2.c
blob: cdd525e9ae69f55192d24d53805e715a4462cb71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile { target { { { i?86-*-* x86_64-*-* } && { ! ia32 } } || aarch64*-*-* } } } */
/* { dg-options "-fdump-rtl-ce1 -O2 --param max-rtl-if-conversion-unpredictable-cost=100" } */

typedef unsigned char uint8_t;
typedef unsigned int uint16_t;

uint8_t
_xtime (const uint8_t byte, const uint16_t generator)
{
  if (byte & 0x80)
    return byte ^ generator;
  else
    return byte << 1;
}

/* { dg-final { scan-rtl-dump "3 true changes made" "ce1" } } */