[AArch64/arm] PR testsuite/85326 Avoid C++ tests when C++ compiler not present
[official-gcc.git] / gcc / testsuite / g++.dg / other / sve_tls_2.C
blobd159255fc9498bdb4a4ee1fbac982658a049923a
1 /* { dg-do compile { target aarch64*-*-* } } */
2 /* { dg-options "-O2 -march=armv8.2-a+sve -fPIC -msve-vector-bits=256" } */
4 #include <stdint.h>
6 typedef int8_t v32qi __attribute__((vector_size (32)));
8 extern __thread int z;
10 void
11 foo (v32qi *a, int *b)
13   v32qi x = a[0], y = a[1];
14   asm volatile ("" :: "w" ((v32qi) { -1, 0, 0, -1, -1, -1, 0, 0,
15                                      -1, -1, -1, -1, 0, 0, 0, 0,
16                                      -1, -1, -1, -1, -1, -1, -1, -1,
17                                      0, 0, 0, 0, 0, 0, 0, 0 } ? x : y)
18                 : "memory");
19   if (*b)
20     {
21       x = a[2], y = a[3];
22       asm volatile ("" :: "w" ((v32qi) { -1, 0, 0, -1, -1, -1, 0, 0,
23                                          -1, -1, -1, -1, 0, 0, 0, 0,
24                                          -1, -1, -1, -1, -1, -1, -1, -1,
25                                          0, 0, 0, 0, 0, 0, 0, 0 } ? x : y),
26                     "r" (z));
27     }
30 /* { dg-final { scan-assembler-times {\tldr\tp[0-9]} 2 } } */