summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/m68k/pr25114.c
blob: bb722d9b86eb2ddee628b8e504ca3e014b64e18d (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
/* { dg-do compile } */
/* { dg-options "-O2 -m68040" } */
/* There should be 16 logical right shift instructions.  One for each function*/
/* { dg-final { scan-assembler-times "lsr" 16 } } */

unsigned int bar (void);

#define F(C) void foo##C (void) { unsigned int a = bar (); if (a <= C) bar (); }
#define G(C) void foo2##C (void) { unsigned int a = bar (); if (a > C) bar (); }

F(0x1)
F(0x3)
F(0x7)
F(0xf)
F(0x1f)
F(0x3f)
F(0x7f)
F(0xff)
G(0x1)
G(0x3)
G(0x7)
G(0xf)
G(0x1f)
G(0x3f)
G(0x7f)
G(0xff)