aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/sh/pr51697.c
blob: d63e329bff94cbd9729e826068f79b82b1cfc3d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Check that DImode comparisons are optimized as expected when compiling
   with -Os.  */
/* { dg-do compile }  */
/* { dg-options "-Os" } */
/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } }  */
/* { dg-final { scan-assembler-times "tst" 2 } }  */
/* { dg-final { scan-assembler-not "cmp" } }  */

int
test_00 (long long* x)
{
  /* 1x tst, no cmp/* insns.  */
  return *x & 0xFFFFFFFF ? -20 : -40;
}

int
test_01 (unsigned long long x)
{
  /* 1x tst, no cmp/* insns.  */
  return x >= 0x100000000LL ? -20 : -40;
}