| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-ifunc "" } */ |
| 3 |
/* { dg-options "-O3 -march=x86-64" } */ |
| 4 |
/* { dg-final { scan-assembler-not "call\[ \t\]+callee" } } */ |
| 5 |
|
| 6 |
__attribute__((always_inline,target("arch=haswell"))) |
| 7 |
inline float callee (float a, float b, float c, float d, |
| 8 |
float e, float f, float g, float h) |
| 9 |
{ |
| 10 |
return a * b + c * d + e * f + g + h + a * c + b * c |
| 11 |
+ a * d + b * e + a * f + c * h + |
| 12 |
b * (a - 0.4f) * (c + h) * (b + e * d) - a / f * h; |
| 13 |
} |
| 14 |
|
| 15 |
__attribute__((target("arch=icelake-server"))) |
| 16 |
void caller (int n, float *a, |
| 17 |
float c1, float c2, float c3, |
| 18 |
float c4, float c5, float c6, |
| 19 |
float c7) |
| 20 |
{ |
| 21 |
for (int i = 0; i < n; i++) |
| 22 |
{ |
| 23 |
a[i] = callee (a[i], c1, c2, c3, c4, c5, c6, c7); |
| 24 |
} |
| 25 |
} |