aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cmp-mem-const-5.c
blob: 5a9096ef84de2b7809536a5c6c69d819bf907372 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile { target { lp64 && { ! { sparc*-*-* hppa*-*-* } } } } } */
/* Excluding sparc since there a prior optimization already reduced the
   constant, i.e., nothing left for us.  */
/* { dg-options "-O2 -fdump-rtl-combine-details" } */
/* { dg-final { scan-rtl-dump "narrow comparison from mode .I to SI" "combine" } } */

typedef __UINT64_TYPE__ uint64_t;

int
le_4bytes_a (uint64_t *x)
{
  return *x <= 0x3ffffdffffffffff;
}

int
le_4bytes_b (uint64_t *x)
{
  return *x < 0x3ffffe0000000000;
}