| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -mcpu=thunderx -march=armv8-a -dA" } */ |
| 3 |
|
| 4 |
/* Make sure that #pragma overrides command line option and |
| 5 |
target attribute overrides the pragma. */ |
| 6 |
|
| 7 |
#pragma GCC target ("cpu=xgene1") |
| 8 |
|
| 9 |
int |
| 10 |
bar (int a) |
| 11 |
{ |
| 12 |
return a - 6; |
| 13 |
} |
| 14 |
|
| 15 |
__attribute__ ((target ("tune=cortex-a53"))) |
| 16 |
int |
| 17 |
bam (int a) |
| 18 |
{ |
| 19 |
return a - bar (a); |
| 20 |
} |
| 21 |
|
| 22 |
/* { dg-final { scan-assembler-times "//.tune xgene1" 1 } } */ |
| 23 |
/* { dg-final { scan-assembler-times "//.tune cortex-a53" 1 } } */ |
| 24 |
/* { dg-final { scan-assembler-not "thunderx" } } */ |