| 1 |
/* Ensure replicated constants don't make things worse. */ |
| 2 |
/* { dg-options "-mthumb -O2" } */ |
| 3 |
/* { dg-require-effective-target arm_thumb2_ok } */ |
| 4 |
|
| 5 |
int |
| 6 |
foo1 (int a) |
| 7 |
{ |
| 8 |
/* It might be tempting to use 0x01000100, but it wouldn't help. */ |
| 9 |
return a + 0x01f001e0; |
| 10 |
} |
| 11 |
|
| 12 |
/* { dg-final { scan-assembler "add.*#32505856" } } */ |
| 13 |
/* { dg-final { scan-assembler "add.*#480" } } */ |
| 14 |
|
| 15 |
int |
| 16 |
foo2 (int a) |
| 17 |
{ |
| 18 |
return a + 0x0f100e10; |
| 19 |
} |
| 20 |
|
| 21 |
/* { dg-final { scan-assembler "add.*#252706816" } } */ |
| 22 |
/* { dg-final { scan-assembler "add.*#3600" } } */ |