| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O3 -fpic -msve-vector-bits=512 -fno-schedule-insns" } */ |
| 3 |
/* { dg-require-effective-target fpic } */ |
| 4 |
/* { dg-require-effective-target tls_native } */ |
| 5 |
|
| 6 |
typedef float v16si __attribute__ ((vector_size (64))); |
| 7 |
|
| 8 |
__thread v16si tx; |
| 9 |
|
| 10 |
v16si foo (v16si a, v16si b, v16si c) |
| 11 |
{ |
| 12 |
v16si y; |
| 13 |
|
| 14 |
/* There is nothing stopping the compiler from making the tls call before |
| 15 |
loading the input variables off the stack. However, there appears to |
| 16 |
be no way in C of enforcing this. Thankfully the compiler doesn't |
| 17 |
do this reordering. */ |
| 18 |
|
| 19 |
y = a + tx + b + c; |
| 20 |
|
| 21 |
return y + 7; |
| 22 |
} |
| 23 |
|
| 24 |
/* { dg-final { scan-assembler-times {\tstr\tz[0-9]+,} 3 } } */ |