| 1 |
/* { dg-do assemble } */ |
| 2 |
/* { dg-require-effective-target lp64 } */ |
| 3 |
/* { dg-require-effective-target power10_ok } */ |
| 4 |
/* { dg-require-effective-target powerpc_prefixed_addr } */ |
| 5 |
/* { dg-options "-O2 -mdejagnu-cpu=power10 -fstack-protector" } */ |
| 6 |
|
| 7 |
/* PR target/105324. Test that power10 fusion does not generate an LWA/CMPDI |
| 8 |
with a large offset that the assembler rejects. Instead it should a |
| 9 |
PLWZ/CMPWI combination. |
| 10 |
|
| 11 |
Originally, the code was dying because the fusion load + compare -1/0/1 |
| 12 |
patterns did not handle the possibility that the load might be prefixed. |
| 13 |
The -fstack-protector option is needed to show the bug. */ |
| 14 |
|
| 15 |
struct Ath__array1D { |
| 16 |
int _current; |
| 17 |
int getCnt() { return _current; } |
| 18 |
}; |
| 19 |
struct extMeasure { |
| 20 |
int _mapTable[10000]; |
| 21 |
Ath__array1D _metRCTable; |
| 22 |
}; |
| 23 |
void measureRC() { |
| 24 |
extMeasure m; |
| 25 |
for (; m._metRCTable.getCnt();) |
| 26 |
for (;;) |
| 27 |
; |
| 28 |
} |