| 1 |
/* PR target/82524 */ |
| 2 |
/* { dg-do compile { target { ! ia32 } } } */ |
| 3 |
/* { dg-options "-O2 -masm=att" } */ |
| 4 |
/* { dg-final { scan-assembler-not "movzbl" } } */ |
| 5 |
|
| 6 |
struct S |
| 7 |
{ |
| 8 |
unsigned char pad1; |
| 9 |
unsigned char val; |
| 10 |
unsigned short pad2; |
| 11 |
unsigned int pad3; |
| 12 |
}; |
| 13 |
|
| 14 |
struct S |
| 15 |
test_and (struct S a, struct S b, struct S c) |
| 16 |
{ |
| 17 |
a.val = b.val & c.val; |
| 18 |
|
| 19 |
return a; |
| 20 |
} |
| 21 |
|
| 22 |
/* { dg-final { scan-assembler "\[ \t\]andb" } } */ |
| 23 |
|
| 24 |
struct S |
| 25 |
test_or (struct S a, struct S b, struct S c) |
| 26 |
{ |
| 27 |
a.val = b.val | c.val; |
| 28 |
|
| 29 |
return a; |
| 30 |
} |
| 31 |
|
| 32 |
/* { dg-final { scan-assembler "\[ \t\]orb" } } */ |
| 33 |
|
| 34 |
struct S |
| 35 |
test_xor (struct S a, struct S b, struct S c) |
| 36 |
{ |
| 37 |
a.val = b.val ^ c.val; |
| 38 |
|
| 39 |
return a; |
| 40 |
} |
| 41 |
|
| 42 |
/* { dg-final { scan-assembler "\[ \t\]xorb" } } */ |