summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/m68k/pr25128.c
blob: f99f817d42699481111fb0935a783dbd34aeb967 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* { dg-do compile } */
/* { dg-options "-Os" } */

/* { dg-final { scan-assembler-times "swap" 4 } } */
/* { dg-final { scan-assembler-times "tst.w" 4 } } */
/* { dg-final { scan-assembler-not "cmp.l" } } */


unsigned int bar (void);
void
foo1 (void)
{
  unsigned int a = bar ();
  if (0x10000 <= a)
    bar ();
}


void
foo2 (void)
{
  unsigned int a = bar ();
  if (0x10000 > a)
    bar ();
}


void
foo3 (void)
{
  int a = bar ();
  if (0x10000 <= a)
    bar ();
}


void
foo4 (void)
{
  int a = bar ();
  if (0x10000 > a)
    bar ();
}