Home | History | Annotate | Download | only in OpenMP
      1 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-32
      2 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple i386-pc-linux-gnu -emit-pch -o %t %s
      3 // RUN: %clang_cc1 -fopenmp -x c++ -triple i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-32
      4 // RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -DLAMBDA -triple i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck -check-prefix=LAMBDA -check-prefix=LAMBDA-32 %s
      5 // RUN: %clang_cc1 -verify -fopenmp -x c++ -fblocks -DBLOCKS -triple i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck -check-prefix=BLOCKS -check-prefix=BLOCKS-32 %s
      6 
      7 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-64
      8 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-pc-linux-gnu -emit-pch -o %t %s
      9 // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-64
     10 // RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -DLAMBDA -triple x86_64-pc-linux-gnu -emit-llvm %s -o - | FileCheck -check-prefix=LAMBDA -check-prefix=LAMBDA-64 %s
     11 // RUN: %clang_cc1 -verify -fopenmp -x c++ -fblocks -DBLOCKS -triple x86_64-pc-linux-gnu -emit-llvm %s -o - | FileCheck -check-prefix=BLOCKS -check-prefix=BLOCKS-64 %s
     12 
     13 // RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -DARRAY -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck -check-prefix=ARRAY %s
     14 // expected-no-diagnostics
     15 #ifndef ARRAY
     16 #ifndef HEADER
     17 #define HEADER
     18 
     19 struct St {
     20   int a, b;
     21   St() : a(0), b(0) {}
     22   St(const St &st) : a(st.a + st.b), b(0) {}
     23   ~St() {}
     24 };
     25 
     26 volatile int g __attribute__((aligned(128))) = 1212;
     27 
     28 struct SS {
     29   int a;
     30   int b : 4;
     31   int &c;
     32   int e[4];
     33   SS(int &d) : a(0), b(0), c(d) {
     34 #pragma omp parallel firstprivate(a, b, c, e)
     35 #ifdef LAMBDA
     36     [&]() {
     37       ++this->a, --b, (this)->c /= 1;
     38 #pragma omp parallel firstprivate(a, b, c)
     39       ++(this)->a, --b, this->c /= 1;
     40     }();
     41 #elif defined(BLOCKS)
     42     ^{
     43       ++a;
     44       --this->b;
     45       (this)->c /= 1;
     46 #pragma omp parallel firstprivate(a, b, c)
     47       ++(this)->a, --b, this->c /= 1;
     48     }();
     49 #else
     50     ++this->a, --b, c /= 1, e[2] = 1111;
     51 #endif
     52   }
     53 };
     54 
     55 template<typename T>
     56 struct SST {
     57   T a;
     58   SST() : a(T()) {
     59 #pragma omp parallel firstprivate(a)
     60 #ifdef LAMBDA
     61     [&]() {
     62       [&]() {
     63         ++this->a;
     64 #pragma omp parallel firstprivate(a)
     65         ++(this)->a;
     66       }();
     67     }();
     68 #elif defined(BLOCKS)
     69     ^{
     70       ^{
     71         ++a;
     72 #pragma omp parallel firstprivate(a)
     73         ++(this)->a;
     74       }();
     75     }();
     76 #else
     77     ++(this)->a;
     78 #endif
     79   }
     80 };
     81 
     82 template <class T>
     83 struct S {
     84   T f;
     85   S(T a) : f(a + g) {}
     86   S() : f(g) {}
     87   S(const S &s, St t = St()) : f(s.f + t.a) {}
     88   operator T() { return T(); }
     89   ~S() {}
     90 };
     91 
     92 // CHECK: [[SS_TY:%.+]] = type { i{{[0-9]+}}, i8
     93 // LAMBDA: [[SS_TY:%.+]] = type { i{{[0-9]+}}, i8
     94 // BLOCKS: [[SS_TY:%.+]] = type { i{{[0-9]+}}, i8
     95 // CHECK-DAG: [[S_FLOAT_TY:%.+]] = type { float }
     96 // CHECK-DAG: [[S_INT_TY:%.+]] = type { i{{[0-9]+}} }
     97 // CHECK-DAG: [[ST_TY:%.+]] = type { i{{[0-9]+}}, i{{[0-9]+}} }
     98 
     99 template <typename T>
    100 T tmain() {
    101   S<T> test;
    102   SST<T> sst;
    103   T t_var __attribute__((aligned(128))) = T();
    104   T vec[] __attribute__((aligned(128))) = {1, 2};
    105   S<T> s_arr[] __attribute__((aligned(128))) = {1, 2};
    106   S<T> var __attribute__((aligned(128))) (3);
    107 #pragma omp parallel firstprivate(t_var, vec, s_arr, var)
    108   {
    109     vec[0] = t_var;
    110     s_arr[0] = var;
    111   }
    112 #pragma omp parallel firstprivate(t_var)
    113   {}
    114   return T();
    115 }
    116 
    117 int main() {
    118   static int sivar;
    119   SS ss(sivar);
    120 #ifdef LAMBDA
    121   // LAMBDA: [[G:@.+]] = global i{{[0-9]+}} 1212,
    122   // LAMBDA-LABEL: @main
    123   // LAMBDA: alloca [[SS_TY]],
    124   // LAMBDA: alloca [[CAP_TY:%.+]],
    125   // LAMBDA: call{{.*}} void [[OUTER_LAMBDA:@[^(]+]]([[CAP_TY]]*
    126   [&]() {
    127   // LAMBDA: define{{.*}} internal{{.*}} void [[OUTER_LAMBDA]](
    128   // LAMBDA: call {{.*}}void {{.+}} @__kmpc_fork_call({{.+}}, i32 2, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i32* [[G]], {{.+}})
    129 #pragma omp parallel firstprivate(g, sivar)
    130   {
    131     // LAMBDA: define {{.+}} @{{.+}}([[SS_TY]]*
    132     // LAMBDA: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 0
    133     // LAMBDA: store i{{[0-9]+}} 0, i{{[0-9]+}}* %
    134     // LAMBDA: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 1
    135     // LAMBDA: store i8
    136     // LAMBDA: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 2
    137     // LAMBDA: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 0
    138     // LAMBDA: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 1
    139     // LAMBDA: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 2
    140     // LAMBDA: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 5, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[SS_TY]]*, [[iz:i64|i32]], {{i64|i32}}, {{i64|i32}}, [4 x i{{[0-9]+}}]*)* [[SS_MICROTASK:@.+]] to void
    141     // LAMBDA: ret
    142 
    143     // LAMBDA: define internal void [[SS_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, [[SS_TY]]* %{{.+}}, [[iz]] {{.+}}, [[iz]] {{.+}}, [[iz]] {{.+}}, [4 x i{{[0-9]+}}]* {{.+}})
    144     // LAMBDA-NOT: getelementptr {{.*}}[[SS_TY]], [[SS_TY]]* %
    145     // LAMBDA: call{{.*}} void
    146     // LAMBDA: ret void
    147 
    148     // LAMBDA: define internal void @{{.+}}(i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, [[SS_TY]]* %{{.+}}, [[iz]] {{.+}}, [[iz]] {{.+}}, [[iz]] {{.+}})
    149     // LAMBDA: [[A_PRIV:%.+]] = alloca i{{[0-9]+}},
    150     // LAMBDA: [[B_PRIV:%.+]] = alloca i{{[0-9]+}},
    151     // LAMBDA: [[C_PRIV:%.+]] = alloca i{{[0-9]+}},
    152     // LAMBDA-64: [[A_CONV:%.+]] = bitcast i64* [[A_PRIV]] to i32*
    153     // LAMBDA-64: store i32* [[A_CONV]], i32** [[REFA:%.+]],
    154     // LAMBDA-32: store i32* [[A_PRIV]], i32** [[REFA:%.+]],
    155     // LAMBDA-64: [[B_CONV:%.+]] = bitcast i64* [[B_PRIV]] to i32*
    156     // LAMBDA-64: [[C_CONV:%.+]] = bitcast i64* [[C_PRIV]] to i32*
    157     // LAMBDA-64: store i32* [[C_CONV]], i32** [[REFC:%.+]],
    158     // LAMBDA-32: store i32* [[C_PRIV]], i32** [[REFC:%.+]],
    159     // LAMBDA-NEXT: [[A_PRIV:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[REFA]],
    160     // LAMBDA-NEXT: [[A_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[A_PRIV]],
    161     // LAMBDA-NEXT: [[INC:%.+]] = add nsw i{{[0-9]+}} [[A_VAL]], 1
    162     // LAMBDA-NEXT: store i{{[0-9]+}} [[INC]], i{{[0-9]+}}* [[A_PRIV]],
    163     // LAMBDA-64-NEXT: [[B_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[B_CONV]],
    164     // LAMBDA-32-NEXT: [[B_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[B_PRIV]],
    165     // LAMBDA-NEXT: [[DEC:%.+]] = add nsw i{{[0-9]+}} [[B_VAL]], -1
    166     // LAMBDA-64-NEXT: store i{{[0-9]+}} [[DEC]], i{{[0-9]+}}* [[B_CONV]],
    167     // LAMBDA-32-NEXT: store i{{[0-9]+}} [[DEC]], i{{[0-9]+}}* [[B_PRIV]],
    168     // LAMBDA-NEXT: [[C_PRIV:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[REFC]],
    169     // LAMBDA-NEXT: [[C_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[C_PRIV]],
    170     // LAMBDA-NEXT: [[DIV:%.+]] = sdiv i{{[0-9]+}} [[C_VAL]], 1
    171     // LAMBDA-NEXT: store i{{[0-9]+}} [[DIV]], i{{[0-9]+}}* [[C_PRIV]],
    172     // LAMBDA-NEXT: ret void
    173 
    174     // LAMBDA: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* noalias %{{.+}}, i32* noalias %{{.+}}, i32* dereferenceable(4) %{{.+}}, [[iz]] {{.*}}%{{.+}})
    175     // LAMBDA: [[SIVAR_PRIVATE_ADDR:%.+]] = alloca i{{[0-9]+}},
    176     // LAMBDA: [[G_PRIVATE_ADDR:%.+]] = alloca i{{[0-9]+}}, align 128
    177     // LAMBDA: [[G_REF:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[G_REF_ADDR:%.+]]
    178     // LAMBDA-64: [[SIVAR_PRIVATE_CONV:%.+]] = bitcast i64* [[SIVAR_PRIVATE_ADDR]] to i32*
    179     // LAMBDA: [[G_VAL:%.+]] = load volatile i{{[0-9]+}}, i{{[0-9]+}}* [[G_REF]], align 128
    180     // LAMBDA: store i{{[0-9]+}} [[G_VAL]], i{{[0-9]+}}* [[G_PRIVATE_ADDR]], align 128
    181     // LAMBDA-NOT: call {{.*}}void @__kmpc_barrier(
    182     g = 1;
    183     sivar = 2;
    184     // LAMBDA: store i{{[0-9]+}} 1, i{{[0-9]+}}* [[G_PRIVATE_ADDR]],
    185     // LAMBDA-64: store i{{[0-9]+}} 2, i{{[0-9]+}}* [[SIVAR_PRIVATE_CONV]],
    186     // LAMBDA-32: store i{{[0-9]+}} 2, i{{[0-9]+}}* [[SIVAR_PRIVATE_ADDR]],
    187     // LAMBDA: [[G_PRIVATE_ADDR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[ARG:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
    188     // LAMBDA: store i{{[0-9]+}}* [[G_PRIVATE_ADDR]], i{{[0-9]+}}** [[G_PRIVATE_ADDR_REF]]
    189     // LAMBDA: [[SIVAR_PRIVATE_ADDR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[ARG:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 1
    190     // LAMBDA-64: store i{{[0-9]+}}* [[SIVAR_PRIVATE_CONV]], i{{[0-9]+}}** [[SIVAR_PRIVATE_ADDR_REF]]
    191     // LAMBDA-32: store i{{[0-9]+}}* [[SIVAR_PRIVATE_ADDR]], i{{[0-9]+}}** [[SIVAR_PRIVATE_ADDR_REF]]
    192     // LAMBDA: call{{.*}} void [[INNER_LAMBDA:@.+]](%{{.+}}* [[ARG]])
    193     [&]() {
    194       // LAMBDA: define {{.+}} void [[INNER_LAMBDA]](%{{.+}}* [[ARG_PTR:%.+]])
    195       // LAMBDA: store %{{.+}}* [[ARG_PTR]], %{{.+}}** [[ARG_PTR_REF:%.+]],
    196       g = 2;
    197       sivar = 4;
    198       // LAMBDA: [[ARG_PTR:%.+]] = load %{{.+}}*, %{{.+}}** [[ARG_PTR_REF]]
    199       // LAMBDA: [[G_PTR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[ARG_PTR]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
    200       // LAMBDA: [[G_REF:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[G_PTR_REF]]
    201       // LAMBDA: [[SIVAR_PTR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[ARG_PTR]], i{{[0-9]+}} 0, i{{[0-9]+}} 1
    202       // LAMBDA: [[SIVAR_REF:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[SIVAR_PTR_REF]]
    203       // LAMBDA: store i{{[0-9]+}} 4, i{{[0-9]+}}* [[SIVAR_REF]]
    204     }();
    205   }
    206   }();
    207   return 0;
    208 #elif defined(BLOCKS)
    209   // BLOCKS: [[G:@.+]] = global i{{[0-9]+}} 1212,
    210   // BLOCKS-LABEL: @main
    211   // BLOCKS: call
    212   // BLOCKS: call {{.*}}void {{%.+}}(i8
    213   ^{
    214   // BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*
    215   // BLOCKS: call {{.*}}void {{.+}} @__kmpc_fork_call({{.+}}, i32 2, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i32* [[G]], {{.+}})
    216 #pragma omp parallel firstprivate(g, sivar)
    217   {
    218     // BLOCKS: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* noalias %{{.+}}, i32* noalias %{{.+}}, i32* dereferenceable(4) %{{.+}}, [[iz:i64|i32]] {{.*}}%{{.+}})
    219     // BLOCKS: [[SIVAR_PRIVATE_ADDR:%.+]] = alloca i{{[0-9]+}},
    220     // BLOCKS: [[G_PRIVATE_ADDR:%.+]] = alloca i{{[0-9]+}}, align 128
    221     // BLOCKS: [[G_REF:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[G_REF_ADDR:%.+]]
    222     // BLOCKS-64: [[SIVAR_PRIVATE_CONV:%.+]] = bitcast i64* [[SIVAR_PRIVATE_ADDR]] to i32*
    223     // BLOCKS: [[G_VAL:%.+]] = load volatile i{{[0-9]+}}, i{{[0-9]+}}* [[G_REF]], align 128
    224     // BLOCKS: store i{{[0-9]+}} [[G_VAL]], i{{[0-9]+}}* [[G_PRIVATE_ADDR]], align 128
    225     // BLOCKS-NOT: call {{.*}}void @__kmpc_barrier(
    226     g = 1;
    227     sivar = 2;
    228     // BLOCKS: store i{{[0-9]+}} 1, i{{[0-9]+}}* [[G_PRIVATE_ADDR]],
    229     // BLOCKS-64: store i{{[0-9]+}} 2, i{{[0-9]+}}* [[SIVAR_PRIVATE_CONV]],
    230     // BLOCKS-32: store i{{[0-9]+}} 2, i{{[0-9]+}}* [[SIVAR_PRIVATE_ADDR]],
    231     // BLOCKS-NOT: [[G]]{{[[^:word:]]}}
    232     // BLOCKS: i{{[0-9]+}}* [[G_PRIVATE_ADDR]]
    233     // BLOCKS-NOT: [[G]]{{[[^:word:]]}}
    234     // BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
    235     // BLOCKS-64: i{{[0-9]+}}* [[SIVAR_PRIVATE_CONV]]
    236     // BLOCKS-32: i{{[0-9]+}}* [[SIVAR_PRIVATE_ADDR]]
    237     // BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
    238     // BLOCKS: call {{.*}}void {{%.+}}(i8
    239     ^{
    240       // BLOCKS: define {{.+}} void {{@.+}}(i8*
    241       g = 2;
    242       sivar = 4;
    243       // BLOCKS-NOT: [[G]]{{[[^:word:]]}}
    244       // BLOCKS: store i{{[0-9]+}} 2, i{{[0-9]+}}*
    245       // BLOCKS-NOT: [[G]]{{[[^:word:]]}}
    246       // BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
    247       // BLOCKS: store i{{[0-9]+}} 4, i{{[0-9]+}}*
    248       // BLOCKS-NOT: [[SIVAR]]{{[[^:word:]]}}
    249       // BLOCKS: ret
    250     }();
    251   }
    252   }();
    253   return 0;
    254 // BLOCKS: define {{.+}} @{{.+}}([[SS_TY]]*
    255 // BLOCKS: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 0
    256 // BLOCKS: store i{{[0-9]+}} 0, i{{[0-9]+}}* %
    257 // BLOCKS: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 1
    258 // BLOCKS: store i8
    259 // BLOCKS: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 2
    260 // BLOCKS: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 0
    261 // BLOCKS: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 1
    262 // BLOCKS: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 2
    263 // BLOCKS: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 5, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[SS_TY]]*, [[iz]], [[iz]], [[iz]], [4 x i{{[0-9]+}}]*)* [[SS_MICROTASK:@.+]] to void
    264 // BLOCKS: ret
    265 
    266 // BLOCKS: define internal void [[SS_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, [[SS_TY]]* %{{.+}}, [[iz]] {{.+}}, [[iz]] {{.+}}, [[iz]] {{.+}}, [4 x i{{[0-9]+}}]* {{.+}})
    267 // BLOCKS-NOT: getelementptr {{.*}}[[SS_TY]], [[SS_TY]]* %
    268 // BLOCKS: call{{.*}} void
    269 // BLOCKS: ret void
    270 
    271 // BLOCKS: define internal void @{{.+}}(i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, [[SS_TY]]* %{{.+}}, [[iz]] {{.+}}, [[iz]] {{.+}}, [[iz]] {{.+}})
    272 // BLOCKS: [[A_PRIV:%.+]] = alloca i{{[0-9]+}},
    273 // BLOCKS: [[B_PRIV:%.+]] = alloca i{{[0-9]+}},
    274 // BLOCKS: [[C_PRIV:%.+]] = alloca i{{[0-9]+}},
    275 // BLOCKS-64: [[A_CONV:%.+]] = bitcast i64* [[A_PRIV]] to i32*
    276 // BLOCKS-64: store i32* [[A_CONV]], i32** [[REFA:%.+]],
    277 // BLOCKS-32: store i32* [[A_PRIV]], i32** [[REFA:%.+]],
    278 // BLOCKS-64: [[B_CONV:%.+]] = bitcast i64* [[B_PRIV]] to i32*
    279 // BLOCKS-64: [[C_CONV:%.+]] = bitcast i64* [[C_PRIV]] to i32*
    280 // BLOCKS-64: store i32* [[C_CONV]], i32** [[REFC:%.+]],
    281 // BLOCKS-32: store i32* [[C_PRIV]], i32** [[REFC:%.+]],
    282 // BLOCKS-NEXT: [[A_PRIV:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[REFA]],
    283 // BLOCKS-NEXT: [[A_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[A_PRIV]],
    284 // BLOCKS-NEXT: [[INC:%.+]] = add nsw i{{[0-9]+}} [[A_VAL]], 1
    285 // BLOCKS-NEXT: store i{{[0-9]+}} [[INC]], i{{[0-9]+}}* [[A_PRIV]],
    286 // BLOCKS-64-NEXT: [[B_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[B_CONV]],
    287 // BLOCKS-32-NEXT: [[B_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[B_PRIV]],
    288 // BLOCKS-NEXT: [[DEC:%.+]] = add nsw i{{[0-9]+}} [[B_VAL]], -1
    289 // BLOCKS-64-NEXT: store i{{[0-9]+}} [[DEC]], i{{[0-9]+}}* [[B_CONV]],
    290 // BLOCKS-32-NEXT: store i{{[0-9]+}} [[DEC]], i{{[0-9]+}}* [[B_PRIV]],
    291 // BLOCKS-NEXT: [[C_PRIV:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[REFC]],
    292 // BLOCKS-NEXT: [[C_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[C_PRIV]],
    293 // BLOCKS-NEXT: [[DIV:%.+]] = sdiv i{{[0-9]+}} [[C_VAL]], 1
    294 // BLOCKS-NEXT: store i{{[0-9]+}} [[DIV]], i{{[0-9]+}}* [[C_PRIV]],
    295 // BLOCKS-NEXT: ret void
    296 #else
    297   S<float> test;
    298   int t_var = 0;
    299   int vec[] = {1, 2};
    300   S<float> s_arr[] = {1, 2};
    301   S<float> var(3);
    302 #pragma omp parallel firstprivate(t_var, vec, s_arr, var, sivar)
    303   {
    304     vec[0] = t_var;
    305     s_arr[0] = var;
    306     sivar = 2;
    307   }
    308 #pragma omp parallel firstprivate(t_var)
    309   {}
    310   return tmain<int>();
    311 #endif
    312 }
    313 
    314 // CHECK: define {{.*}}i{{[0-9]+}} @main()
    315 // CHECK: [[TEST:%.+]] = alloca [[S_FLOAT_TY]],
    316 // CHECK: [[T_VAR:%.+]] = alloca i32,
    317 // CHECK: [[T_VARCAST:%.+]] = alloca [[iz:i64|i32]],
    318 // CHECK: [[SIVARCAST:%.+]] = alloca [[iz]],
    319 // CHECK: call {{.*}} [[S_FLOAT_TY_DEF_CONSTR:@.+]]([[S_FLOAT_TY]]* [[TEST]])
    320 // CHECK: [[T_VARVAL:%.+]] = load i32, i32* [[T_VAR]],
    321 // CHECK-64: [[T_VARCONV:%.+]] = bitcast i64* [[T_VARCAST]] to i32*
    322 // CHECK-64: store i32 [[T_VARVAL]], i32* [[T_VARCONV]],
    323 // CHECK-32: store i32 [[T_VARVAL]], i32* [[T_VARCAST]],
    324 // CHECK: [[T_VARPVT:%.+]] = load [[iz]], [[iz]]* [[T_VARCAST]],
    325 // CHECK: [[SIVARVAL:%.+]] = load i32, i32* @{{.+}},
    326 // CHECK-64: [[SIVARCONV:%.+]] = bitcast i64* [[SIVARCAST]] to i32*
    327 // CHECK-64: store i32 [[SIVARVAL]], i32* [[SIVARCONV]],
    328 // CHECK-32: store i32 [[SIVARVAL]], i32* [[SIVARCAST]],
    329 // CHECK: [[SIVARPVT:%.+]] = load [[iz]], [[iz]]* [[SIVARCAST]],
    330 // CHECK: call {{.*}}void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 5, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [2 x i32]*, [[iz]], [2 x [[S_FLOAT_TY]]]*, [[S_FLOAT_TY]]*, i{{[0-9]+}})* [[MAIN_MICROTASK:@.+]] to void {{.*}}[[iz]] [[T_VARPVT]],{{.*}}[[iz]] [[SIVARPVT]]
    331 // CHECK: = call {{.*}}i{{.+}} [[TMAIN_INT:@.+]]()
    332 // CHECK: call {{.*}} [[S_FLOAT_TY_DESTR:@.+]]([[S_FLOAT_TY]]*
    333 // CHECK: ret
    334 //
    335 // CHECK: define internal {{.*}}void [[MAIN_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, [2 x i32]* dereferenceable(8) %{{.+}}, [[iz]] {{.*}}%{{.+}}, [2 x [[S_FLOAT_TY]]]* dereferenceable(8) %{{.+}}, [[S_FLOAT_TY]]* dereferenceable(4) %{{.+}}, [[iz]] {{.*}}[[SIVAR:%.+]])
    336 // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}},
    337 // CHECK: [[SIVAR7_PRIV:%.+]] = alloca i{{[0-9]+}},
    338 // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}],
    339 // CHECK: [[S_ARR_PRIV:%.+]] = alloca [2 x [[S_FLOAT_TY]]],
    340 // CHECK: [[VAR_PRIV:%.+]] = alloca [[S_FLOAT_TY]],
    341 // CHECK: store i{{[0-9]+}}* [[GTID_ADDR]], i{{[0-9]+}}** [[GTID_ADDR_ADDR:%.+]],
    342 
    343 // CHECK: [[VEC_REF:%.+]] = load [2 x i{{[0-9]+}}]*, [2 x i{{[0-9]+}}]** %
    344 // CHECK-NOT: load i{{[0-9]+}}*, i{{[0-9]+}}** %
    345 // CHECK-64: [[T_VAR_CONV:%.+]] = bitcast i64* [[T_VAR_PRIV]] to i32*
    346 // CHECK: [[S_ARR_REF:%.+]] = load [2 x [[S_FLOAT_TY]]]*, [2 x [[S_FLOAT_TY]]]** %
    347 // CHECK: [[VAR_REF:%.+]] = load [[S_FLOAT_TY]]*, [[S_FLOAT_TY]]** %
    348 // CHECK-NOT: load i{{[0-9]+}}*, i{{[0-9]+}}** %
    349 // CHECK-64: [[SIVAR7_CONV:%.+]] = bitcast i64* [[SIVAR7_PRIV]] to i32*
    350 // CHECK: [[VEC_DEST:%.+]] = bitcast [2 x i{{[0-9]+}}]* [[VEC_PRIV]] to i8*
    351 // CHECK: [[VEC_SRC:%.+]] = bitcast [2 x i{{[0-9]+}}]* [[VEC_REF]] to i8*
    352 // CHECK: call void @llvm.memcpy.{{.+}}(i8* [[VEC_DEST]], i8* [[VEC_SRC]],
    353 // CHECK: [[S_ARR_PRIV_BEGIN:%.+]] = getelementptr inbounds [2 x [[S_FLOAT_TY]]], [2 x [[S_FLOAT_TY]]]* [[S_ARR_PRIV]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
    354 // CHECK: [[S_ARR_BEGIN:%.+]] = bitcast [2 x [[S_FLOAT_TY]]]* [[S_ARR_REF]] to [[S_FLOAT_TY]]*
    355 // CHECK: [[S_ARR_PRIV_END:%.+]] = getelementptr [[S_FLOAT_TY]], [[S_FLOAT_TY]]* [[S_ARR_PRIV_BEGIN]], i{{[0-9]+}} 2
    356 // CHECK: [[IS_EMPTY:%.+]] = icmp eq [[S_FLOAT_TY]]* [[S_ARR_PRIV_BEGIN]], [[S_ARR_PRIV_END]]
    357 // CHECK: br i1 [[IS_EMPTY]], label %[[S_ARR_BODY_DONE:.+]], label %[[S_ARR_BODY:.+]]
    358 // CHECK: [[S_ARR_BODY]]
    359 // CHECK: call {{.*}} [[ST_TY_DEFAULT_CONSTR:@.+]]([[ST_TY]]* [[ST_TY_TEMP:%.+]])
    360 // CHECK: call {{.*}} [[S_FLOAT_TY_COPY_CONSTR:@.+]]([[S_FLOAT_TY]]* {{.+}}, [[S_FLOAT_TY]]* {{.+}}, [[ST_TY]]* [[ST_TY_TEMP]])
    361 // CHECK: call {{.*}} [[ST_TY_DESTR:@.+]]([[ST_TY]]* [[ST_TY_TEMP]])
    362 // CHECK: br i1 {{.+}}, label %{{.+}}, label %[[S_ARR_BODY]]
    363 // CHECK: call {{.*}} [[ST_TY_DEFAULT_CONSTR]]([[ST_TY]]* [[ST_TY_TEMP:%.+]])
    364 // CHECK: call {{.*}} [[S_FLOAT_TY_COPY_CONSTR]]([[S_FLOAT_TY]]* [[VAR_PRIV]], [[S_FLOAT_TY]]* {{.*}} [[VAR_REF]], [[ST_TY]]* [[ST_TY_TEMP]])
    365 // CHECK: call {{.*}} [[ST_TY_DESTR]]([[ST_TY]]* [[ST_TY_TEMP]])
    366 
    367 // CHECK-64: store i{{[0-9]+}} 2, i{{[0-9]+}}* [[SIVAR7_CONV]],
    368 // CHECK-32: store i{{[0-9]+}} 2, i{{[0-9]+}}* [[SIVAR7_PRIV]],
    369 
    370 // CHECK-DAG: call {{.*}} [[S_FLOAT_TY_DESTR]]([[S_FLOAT_TY]]* [[VAR_PRIV]])
    371 // CHECK-DAG: call {{.*}} [[S_FLOAT_TY_DESTR]]([[S_FLOAT_TY]]*
    372 // CHECK: ret void
    373 // CHECK: define {{.*}} i{{[0-9]+}} [[TMAIN_INT]]()
    374 // CHECK: [[TEST:%.+]] = alloca [[S_INT_TY]],
    375 // CHECK: call {{.*}} [[S_INT_TY_DEF_CONSTR:@.+]]([[S_INT_TY]]* [[TEST]])
    376 // CHECK: call {{.*}}void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 4, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [2 x i32]*, i32*, [2 x [[S_INT_TY]]]*, [[S_INT_TY]]*)* [[TMAIN_MICROTASK:@.+]] to void
    377 // CHECK: call {{.*}} [[S_INT_TY_DESTR:@.+]]([[S_INT_TY]]*
    378 // CHECK: ret
    379 //
    380 // CHECK: define {{.+}} @{{.+}}([[SS_TY]]*
    381 // CHECK: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 0
    382 // CHECK: store i{{[0-9]+}} 0, i{{[0-9]+}}* %
    383 // CHECK: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 1
    384 // CHECK: store i8
    385 // CHECK: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 2
    386 // CHECK: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 0
    387 // CHECK: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 1
    388 // CHECK: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 2
    389 // CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 5, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[SS_TY]]*, [[iz]], [[iz]], [[iz]], [4 x i32]*)* [[SS_MICROTASK:@.+]] to void
    390 // CHECK: ret
    391 
    392 // CHECK: define internal void [[SS_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, [[SS_TY]]* %{{.+}}, [[iz]] {{.+}}, [[iz]] {{.+}}, [[iz]] {{.+}}, [4 x i{{[0-9]+}}]* {{.+}})
    393 // CHECK: [[A_PRIV:%.+]] = alloca i{{[0-9]+}},
    394 // CHECK: [[B_PRIV:%.+]] = alloca i{{[0-9]+}},
    395 // CHECK: [[C_PRIV:%.+]] = alloca i{{[0-9]+}},
    396 // CHECK: [[E_PRIV:%.+]] = alloca [4 x i{{[0-9]+}}],
    397 // CHECK: store i{{[0-9]+}} {{.+}}, i{{[0-9]+}}* [[A_PRIV]]
    398 // CHECK: store i{{[0-9]+}} {{.+}}, i{{[0-9]+}}* [[B_PRIV]]
    399 // CHECK: store i{{[0-9]+}} {{.+}}, i{{[0-9]+}}* [[C_PRIV]]
    400 // CHECK-64: [[A_CONV:%.+]] = bitcast i64* [[A_PRIV:%.+]] to i32*
    401 // CHECK-64: store i32* [[A_CONV]], i32** [[REFA:%.+]],
    402 // CHECK-32: store i32* [[A_PRIV]], i32** [[REFA:%.+]],
    403 // CHECK-64: [[B_CONV:%.+]] = bitcast i64* [[B_PRIV:%.+]] to i32*
    404 // CHECK-64: [[C_CONV:%.+]] = bitcast i64* [[C_PRIV:%.+]] to i32*
    405 // CHECK-64: store i32* [[C_CONV]], i32** [[REFC:%.+]],
    406 // CHECK-32: store i32* [[C_PRIV]], i32** [[REFC:%.+]],
    407 // CHECK: bitcast [4 x i{{[0-9]+}}]* [[E_PRIV]] to i8*
    408 // CHECK: bitcast [4 x i{{[0-9]+}}]* %{{.+}} to i8*
    409 // CHECK: call void @llvm.memcpy
    410 // CHECK: store [4 x i{{[0-9]+}}]* [[E_PRIV]], [4 x i{{[0-9]+}}]** [[REFE:%.+]],
    411 // CHECK-NEXT: [[A_PRIV:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[REFA]],
    412 // CHECK-NEXT: [[A_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[A_PRIV]],
    413 // CHECK-NEXT: [[INC:%.+]] = add nsw i{{[0-9]+}} [[A_VAL]], 1
    414 // CHECK-NEXT: store i{{[0-9]+}} [[INC]], i{{[0-9]+}}* [[A_PRIV]],
    415 // CHECK-64-NEXT: [[B_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[B_CONV]],
    416 // CHECK-32-NEXT: [[B_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[B_PRIV]],
    417 // CHECK-NEXT: [[DEC:%.+]] = add nsw i{{[0-9]+}} [[B_VAL]], -1
    418 // CHECK-64-NEXT: store i{{[0-9]+}} [[DEC]], i{{[0-9]+}}* [[B_CONV]],
    419 // CHECK-32-NEXT: store i{{[0-9]+}} [[DEC]], i{{[0-9]+}}* [[B_PRIV]],
    420 // CHECK-NEXT: [[C_PRIV:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[REFC]],
    421 // CHECK-NEXT: [[C_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[C_PRIV]],
    422 // CHECK-NEXT: [[DIV:%.+]] = sdiv i{{[0-9]+}} [[C_VAL]], 1
    423 // CHECK-NEXT: store i{{[0-9]+}} [[DIV]], i{{[0-9]+}}* [[C_PRIV]],
    424 // CHECK-NEXT: [[E_PRIV:%.+]] = load [4 x i{{[0-9]+}}]*, [4 x i{{[0-9]+}}]** [[REFE]],
    425 // CHECK-NEXT: [[E_PRIV_2:%.+]] = getelementptr inbounds [4 x i{{[0-9]+}}], [4 x i{{[0-9]+}}]* [[E_PRIV]], i{{[0-9]+}} 0, i{{[0-9]+}} 2
    426 // CHECK-NEXT: store i32 1111, i32* [[E_PRIV_2]],
    427 // CHECK-NEXT: ret void
    428 
    429 // CHECK: define internal {{.*}}void [[TMAIN_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, [2 x i32]* dereferenceable(8) %{{.+}}, i32* dereferenceable(4) %{{.+}}, [2 x [[S_INT_TY]]]* dereferenceable(8) %{{.+}}, [[S_INT_TY]]* dereferenceable(4) %{{.+}})
    430 // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, align 128
    431 // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], align 128
    432 // CHECK: [[S_ARR_PRIV:%.+]] = alloca [2 x [[S_INT_TY]]], align 128
    433 // CHECK: [[VAR_PRIV:%.+]] = alloca [[S_INT_TY]], align 128
    434 // CHECK: store i{{[0-9]+}}* [[GTID_ADDR]], i{{[0-9]+}}** [[GTID_ADDR_ADDR:%.+]],
    435 
    436 // CHECK: [[VEC_REF:%.+]] = load [2 x i{{[0-9]+}}]*, [2 x i{{[0-9]+}}]** %
    437 // CHECK: [[T_VAR_REF:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** %
    438 // CHECK: [[S_ARR_REF:%.+]] = load [2 x [[S_INT_TY]]]*, [2 x [[S_INT_TY]]]** %
    439 // CHECK: [[VAR_REF:%.+]] = load [[S_INT_TY]]*, [[S_INT_TY]]** %
    440 
    441 // CHECK: [[T_VAR_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[T_VAR_REF]], align 128
    442 // CHECK: store i{{[0-9]+}} [[T_VAR_VAL]], i{{[0-9]+}}* [[T_VAR_PRIV]], align 128
    443 // CHECK: [[VEC_DEST:%.+]] = bitcast [2 x i{{[0-9]+}}]* [[VEC_PRIV]] to i8*
    444 // CHECK: [[VEC_SRC:%.+]] = bitcast [2 x i{{[0-9]+}}]* [[VEC_REF]] to i8*
    445 // CHECK: call void @llvm.memcpy.{{.+}}(i8* [[VEC_DEST]], i8* [[VEC_SRC]], i{{[0-9]+}} {{[0-9]+}}, i{{[0-9]+}} 128,
    446 // CHECK: [[S_ARR_PRIV_BEGIN:%.+]] = getelementptr inbounds [2 x [[S_INT_TY]]], [2 x [[S_INT_TY]]]* [[S_ARR_PRIV]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
    447 // CHECK: [[S_ARR_BEGIN:%.+]] = bitcast [2 x [[S_INT_TY]]]* [[S_ARR_REF]] to [[S_INT_TY]]*
    448 // CHECK: [[S_ARR_PRIV_END:%.+]] = getelementptr [[S_INT_TY]], [[S_INT_TY]]* [[S_ARR_PRIV_BEGIN]], i{{[0-9]+}} 2
    449 // CHECK: [[IS_EMPTY:%.+]] = icmp eq [[S_INT_TY]]* [[S_ARR_PRIV_BEGIN]], [[S_ARR_PRIV_END]]
    450 // CHECK: br i1 [[IS_EMPTY]], label %[[S_ARR_BODY_DONE:.+]], label %[[S_ARR_BODY:.+]]
    451 // CHECK: [[S_ARR_BODY]]
    452 // CHECK: call {{.*}} [[ST_TY_DEFAULT_CONSTR]]([[ST_TY]]* [[ST_TY_TEMP:%.+]])
    453 // CHECK: call {{.*}} [[S_INT_TY_COPY_CONSTR:@.+]]([[S_INT_TY]]* {{.+}}, [[S_INT_TY]]* {{.+}}, [[ST_TY]]* [[ST_TY_TEMP]])
    454 // CHECK: call {{.*}} [[ST_TY_DESTR]]([[ST_TY]]* [[ST_TY_TEMP]])
    455 // CHECK: br i1 {{.+}}, label %{{.+}}, label %[[S_ARR_BODY]]
    456 // CHECK: call {{.*}} [[ST_TY_DEFAULT_CONSTR]]([[ST_TY]]* [[ST_TY_TEMP:%.+]])
    457 // CHECK: call {{.*}} [[S_INT_TY_COPY_CONSTR]]([[S_INT_TY]]* [[VAR_PRIV]], [[S_INT_TY]]* {{.*}} [[VAR_REF]], [[ST_TY]]* [[ST_TY_TEMP]])
    458 // CHECK: call {{.*}} [[ST_TY_DESTR]]([[ST_TY]]* [[ST_TY_TEMP]])
    459 // CHECK-NOT: call {{.*}}void @__kmpc_barrier(
    460 // CHECK-DAG: call {{.*}} [[S_INT_TY_DESTR]]([[S_INT_TY]]* [[VAR_PRIV]])
    461 // CHECK-DAG: call {{.*}} [[S_INT_TY_DESTR]]([[S_INT_TY]]*
    462 // CHECK: ret void
    463 
    464 #endif
    465 #else
    466 struct St {
    467   int a, b;
    468   St() : a(0), b(0) {}
    469   St(const St &) { }
    470   ~St() {}
    471   void St_func(St s[2], int n, long double vla1[n]) {
    472     double vla2[n][n] __attribute__((aligned(128)));
    473     a = b;
    474 #pragma omp parallel firstprivate(s, vla1, vla2)
    475     vla1[b] = vla2[1][n - 1] = a = b;
    476   }
    477 };
    478 
    479 // ARRAY-LABEL: array_func
    480 void array_func(float a[3], St s[2], int n, long double vla1[n]) {
    481   double vla2[n][n] __attribute__((aligned(128)));
    482 // ARRAY: @__kmpc_fork_call(
    483 // ARRAY-DAG: [[PRIV_S:%.+]] = alloca %struct.St*,
    484 // ARRAY-DAG: [[PRIV_VLA1:%.+]] = alloca x86_fp80*,
    485 // ARRAY-DAG: [[PRIV_A:%.+]] = alloca float*,
    486 // ARRAY-DAG: [[PRIV_VLA2:%.+]] = alloca double*,
    487 // ARRAY-DAG: store %struct.St* %{{.+}}, %struct.St** [[PRIV_S]],
    488 // ARRAY-DAG: store x86_fp80* %{{.+}}, x86_fp80** [[PRIV_VLA1]],
    489 // ARRAY-DAG: store float* %{{.+}}, float** [[PRIV_A]],
    490 // ARRAY-DAG: store double* %{{.+}}, double** [[PRIV_VLA2]],
    491 // ARRAY: call i8* @llvm.stacksave()
    492 // ARRAY: [[SIZE:%.+]] = mul nuw i64 %{{.+}}, 8
    493 // ARRAY: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.+}}, i8* %{{.+}}, i64 [[SIZE]], i32 128, i1 false)
    494 #pragma omp parallel firstprivate(a, s, vla1, vla2)
    495   s[0].St_func(s, n, vla1);
    496   ;
    497 }
    498 
    499 // ARRAY-LABEL: St_func
    500 // ARRAY: @__kmpc_fork_call(
    501 // ARRAY-DAG: [[PRIV_VLA1:%.+]] = alloca x86_fp80*,
    502 // ARRAY-DAG: [[PRIV_S:%.+]] = alloca %struct.St*,
    503 // ARRAY-DAG: [[PRIV_VLA2:%.+]] = alloca double*,
    504 // ARRAY-DAG: store %struct.St* %{{.+}}, %struct.St** [[PRIV_S]],
    505 // ARRAY-DAG: store x86_fp80* %{{.+}}, x86_fp80** [[PRIV_VLA1]],
    506 // ARRAY-DAG: store double* %{{.+}}, double** [[PRIV_VLA2]],
    507 // ARRAY: call i8* @llvm.stacksave()
    508 // ARRAY: [[SIZE:%.+]] = mul nuw i64 %{{.+}}, 8
    509 // ARRAY: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.+}}, i8* %{{.+}}, i64 [[SIZE]], i32 128, i1 false)
    510 #endif
    511 
    512 
    513