| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-fno-inline -O2 -ffixed-x2 -ffixed-x3 -ffixed-x4 -ffixed-x5 -ffixed-x6 -ffixed-x7 -ffixed-x8 -ffixed-x9 -ffixed-x10 -ffixed-x11 -ffixed-x12 -ffixed-x13 -ffixed-x14 -ffixed-x15 -ffixed-x16 -ffixed-x17 -ffixed-x18 -ffixed-x19 -ffixed-x20 -ffixed-x21 -ffixed-x22 -ffixed-x23 -ffixed-x24 -ffixed-x25 -ffixed-x26 -ffixed-x27 -ffixed-x28 --save-temps -mgeneral-regs-only -fno-ipa-cp -fdump-rtl-ira" } */ |
| 3 |
|
| 4 |
extern void abort (); |
| 5 |
|
| 6 |
int |
| 7 |
cal (int a, int b) |
| 8 |
{ |
| 9 |
/* { dg-final { scan-assembler-times "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" 2 } } */ |
| 10 |
int sum = a + b; |
| 11 |
int sum1 = a * b; |
| 12 |
/* { dg-final { scan-assembler-times "ldp\tx29, x30, \\\[sp\\\], \[0-9\]+" 2 } } */ |
| 13 |
/* { dg-final { scan-rtl-dump "assign reg 30" "ira" } } */ |
| 14 |
return (a + b + sum + sum1); |
| 15 |
} |
| 16 |
|
| 17 |
int |
| 18 |
main (int argc, char **argv) |
| 19 |
{ |
| 20 |
int ret = cal (1, 2); |
| 21 |
|
| 22 |
if (ret != 8) |
| 23 |
abort (); |
| 24 |
|
| 25 |
return 0; |
| 26 |
} |
| 27 |
|