blob: 220a1c0778bbc8eaca6d2521eb7ea1133159c246 (
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
|
/* PR rtl-optimization/46865 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
extern unsigned long f;
#define m1(f) \
if (f & 1) \
asm volatile ("nop /* asmnop */\n"); \
else \
asm volatile ("nop /* asmnop */\n");
#define m2(f) \
if (f & 1) \
asm volatile ("nop /* asmnop */\n" : : "i" (6) : "cx"); \
else \
asm volatile ("nop /* asmnop */\n" : : "i" (6) : "cx");
void
foo (void)
{
m1 (f);
}
void
bar (void)
{
m2 (f);
}
/* { dg-final { scan-assembler-times "asmnop" 2 } } */
|