blob: 4a91f7c962bebbc425e3f74d3e8530c7b1cf385d (
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
|
/* PR rtl-optimization/46865 */
/* { dg-do compile } */
/* { dg-options "-O2 -save-temps" } */
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 } } */
/* { dg-final { cleanup-saved-temps } } */
|