| 1 |
/* { dg-do compile { target { lp64 } } } */ |
| 2 |
/* { dg-options "-O1 -march=z13 -mzarch -fdump-rtl-combine-details" } */ |
| 3 |
/* { dg-final { scan-assembler-not {\tclc\t} } } */ |
| 4 |
/* { dg-final { scan-rtl-dump "narrow comparison from mode DI to QI" "combine" } } */ |
| 5 |
|
| 6 |
struct s |
| 7 |
{ |
| 8 |
long a; |
| 9 |
unsigned b : 1; |
| 10 |
unsigned c : 1; |
| 11 |
}; |
| 12 |
|
| 13 |
int foo (struct s *x) |
| 14 |
{ |
| 15 |
/* Expression |
| 16 |
x->b || x->c |
| 17 |
is transformed into |
| 18 |
_1 = BIT_FIELD_REF <*x_4(D), 64, 64>; |
| 19 |
_2 = _1 > 0x3FFFFFFFFFFFFFFF; |
| 20 |
where the constant may materialize in the literal pool and an 8 byte CLC |
| 21 |
may be emitted. Ensure this is not the case. |
| 22 |
*/ |
| 23 |
return x->b || x->c; |
| 24 |
} |