Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/tls_preserve_2.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fpic -msve-vector-bits=256 -fno-schedule-insns" } */
3 /* { dg-require-effective-target fpic } */
4 /* { dg-require-effective-target tls_native } */
5
6 typedef float v8si __attribute__ ((vector_size (32)));
7
8 __thread v8si tx;
9
10 v8si foo (v8si a, v8si b, v8si c)
11 {
12 v8si 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 } } */