2015-05-20 12:24:19 +08:00
|
|
|
// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
|
|
|
|
// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-pch -o %t %s
|
|
|
|
// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
|
|
|
|
// RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -DLAMBDA -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck -check-prefix=LAMBDA %s
|
|
|
|
// RUN: %clang_cc1 -verify -fopenmp -x c++ -fblocks -DBLOCKS -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck -check-prefix=BLOCKS %s
|
2017-12-30 02:07:07 +08:00
|
|
|
|
|
|
|
// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s
|
|
|
|
// RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-pch -o %t %s
|
|
|
|
// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s
|
|
|
|
// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -std=c++11 -DLAMBDA -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s
|
|
|
|
// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -fblocks -DBLOCKS -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s
|
|
|
|
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}}
|
2015-04-22 20:24:45 +08:00
|
|
|
// expected-no-diagnostics
|
|
|
|
#ifndef HEADER
|
|
|
|
#define HEADER
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
struct S {
|
|
|
|
T f;
|
|
|
|
S(T a) : f(a) {}
|
|
|
|
S() : f() {}
|
|
|
|
operator T() { return T(); }
|
|
|
|
~S() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
volatile double g;
|
2015-09-04 19:26:21 +08:00
|
|
|
volatile double &g1 = g;
|
2015-04-22 20:24:45 +08:00
|
|
|
|
|
|
|
// CHECK: [[S_FLOAT_TY:%.+]] = type { float }
|
|
|
|
// CHECK: [[S_INT_TY:%.+]] = type { i{{[0-9]+}} }
|
|
|
|
template <typename T>
|
|
|
|
T tmain() {
|
|
|
|
S<T> test;
|
|
|
|
T t_var = T();
|
|
|
|
T vec[] = {1, 2};
|
|
|
|
S<T> s_arr[] = {1, 2};
|
2015-09-04 19:26:21 +08:00
|
|
|
S<T> &var = test;
|
2015-04-22 20:24:45 +08:00
|
|
|
#pragma omp parallel
|
|
|
|
#pragma omp for private(t_var, vec, s_arr, s_arr, var, var)
|
|
|
|
for (int i = 0; i < 2; ++i) {
|
|
|
|
vec[i] = t_var;
|
|
|
|
s_arr[i] = var;
|
|
|
|
}
|
|
|
|
return T();
|
|
|
|
}
|
|
|
|
|
|
|
|
int main() {
|
2015-09-16 02:56:58 +08:00
|
|
|
static int svar;
|
2015-04-22 20:24:45 +08:00
|
|
|
#ifdef LAMBDA
|
2018-02-24 03:30:48 +08:00
|
|
|
// LAMBDA: [[G:@.+]] = {{(dso_local )?}}global double
|
2015-04-22 20:24:45 +08:00
|
|
|
// LAMBDA-LABEL: @main
|
2015-06-30 01:29:50 +08:00
|
|
|
// LAMBDA: call{{.*}} void [[OUTER_LAMBDA:@.+]](
|
2015-04-22 20:24:45 +08:00
|
|
|
[&]() {
|
2015-09-16 02:56:58 +08:00
|
|
|
static float sfvar;
|
2015-04-22 20:24:45 +08:00
|
|
|
// LAMBDA: define{{.*}} internal{{.*}} void [[OUTER_LAMBDA]](
|
2015-09-10 16:12:02 +08:00
|
|
|
// LAMBDA: call {{.*}}void {{.+}} @__kmpc_fork_call({{.+}}, i32 0, {{.+}}* [[OMP_REGION:@.+]] to {{.+}})
|
2015-04-22 20:24:45 +08:00
|
|
|
#pragma omp parallel
|
2015-09-16 02:56:58 +08:00
|
|
|
#pragma omp for private(g, g1, svar, sfvar)
|
2015-04-22 20:24:45 +08:00
|
|
|
for (int i = 0; i < 2; ++i) {
|
2015-09-10 16:12:02 +08:00
|
|
|
// LAMBDA: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* noalias %{{.+}}, i32* noalias %{{.+}})
|
2015-04-22 20:24:45 +08:00
|
|
|
// LAMBDA: [[G_PRIVATE_ADDR:%.+]] = alloca double,
|
2017-10-07 00:17:25 +08:00
|
|
|
// LAMBDA: [[G1_PRIVATE_ADDR:%.+]] = alloca double,
|
|
|
|
// LAMBDA: [[G1_PRIVATE_REF:%.+]] = alloca double*,
|
2015-09-16 02:56:58 +08:00
|
|
|
// LAMBDA: [[SVAR_PRIVATE_ADDR:%.+]] = alloca i{{[0-9]+}},
|
|
|
|
// LAMBDA: [[SFVAR_PRIVATE_ADDR:%.+]] = alloca float,
|
2015-04-22 20:24:45 +08:00
|
|
|
g = 1;
|
2015-09-04 19:26:21 +08:00
|
|
|
g1 = 1;
|
2015-09-16 02:56:58 +08:00
|
|
|
svar = 3;
|
|
|
|
sfvar = 4.0;
|
2015-06-30 01:29:50 +08:00
|
|
|
// LAMBDA: call {{.*}}void @__kmpc_for_static_init_4(
|
2015-07-14 18:32:29 +08:00
|
|
|
// LAMBDA: store double 1.0{{.+}}, double* [[G_PRIVATE_ADDR]],
|
2017-10-07 00:17:25 +08:00
|
|
|
// LAMBDA: [[G1_PRIVATE_ADDR:%.+]] = load double*, double** [[G1_PRIVATE_REF]],
|
|
|
|
// LAMBDA: store volatile double 1.0{{.+}}, double* [[G1_PRIVATE_ADDR]],
|
2015-09-16 02:56:58 +08:00
|
|
|
// LAMBDA: store i{{[0-9]+}} 3, i{{[0-9]+}}* [[SVAR_PRIVATE_ADDR]],
|
|
|
|
// LAMBDA: store float 4.0{{.+}}, float* [[SFVAR_PRIVATE_ADDR]],
|
2015-04-22 20:24:45 +08:00
|
|
|
// LAMBDA: [[G_PRIVATE_ADDR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[ARG:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
|
|
|
|
// LAMBDA: store double* [[G_PRIVATE_ADDR]], double** [[G_PRIVATE_ADDR_REF]]
|
2017-10-07 00:17:25 +08:00
|
|
|
// LAMBDA: [[G1_PRIVATE_ADDR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[ARG:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 1
|
|
|
|
// LAMBDA: [[G1_PRIVATE_ADDR:%.+]] = load double*, double** [[G1_PRIVATE_REF]],
|
|
|
|
// LAMBDA: store double* [[G1_PRIVATE_ADDR]], double** [[G1_PRIVATE_ADDR_REF]]
|
|
|
|
// LAMBDA: [[SVAR_PRIVATE_ADDR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[ARG:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 2
|
2015-09-16 02:56:58 +08:00
|
|
|
// LAMBDA: store i{{[0-9]+}}* [[SVAR_PRIVATE_ADDR]], i{{[0-9]+}}** [[SVAR_PRIVATE_ADDR_REF]]
|
2017-10-07 00:17:25 +08:00
|
|
|
// LAMBDA: [[SFVAR_PRIVATE_ADDR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[ARG:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 3
|
2015-09-16 02:56:58 +08:00
|
|
|
// LAMBDA: store float* [[SFVAR_PRIVATE_ADDR]], float** [[SFVAR_PRIVATE_ADDR_REF]]
|
2015-06-30 01:29:50 +08:00
|
|
|
// LAMBDA: call{{.*}} void [[INNER_LAMBDA:@.+]](%{{.+}}* [[ARG]])
|
|
|
|
// LAMBDA: call {{.*}}void @__kmpc_for_static_fini(
|
2015-04-22 20:24:45 +08:00
|
|
|
[&]() {
|
|
|
|
// LAMBDA: define {{.+}} void [[INNER_LAMBDA]](%{{.+}}* [[ARG_PTR:%.+]])
|
|
|
|
// LAMBDA: store %{{.+}}* [[ARG_PTR]], %{{.+}}** [[ARG_PTR_REF:%.+]],
|
|
|
|
g = 2;
|
2015-09-04 19:26:21 +08:00
|
|
|
g1 = 2;
|
2015-09-16 02:56:58 +08:00
|
|
|
svar = 4;
|
|
|
|
sfvar = 8.0;
|
2015-04-22 20:24:45 +08:00
|
|
|
// LAMBDA: [[ARG_PTR:%.+]] = load %{{.+}}*, %{{.+}}** [[ARG_PTR_REF]]
|
|
|
|
// LAMBDA: [[G_PTR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[ARG_PTR]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
|
|
|
|
// LAMBDA: [[G_REF:%.+]] = load double*, double** [[G_PTR_REF]]
|
2015-07-14 18:32:29 +08:00
|
|
|
// LAMBDA: store double 2.0{{.+}}, double* [[G_REF]]
|
2017-10-07 00:17:25 +08:00
|
|
|
// LAMBDA: [[G1_PTR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[ARG_PTR]], i{{[0-9]+}} 0, i{{[0-9]+}} 1
|
|
|
|
// LAMBDA: [[G1_REF:%.+]] = load double*, double** [[G1_PTR_REF]]
|
|
|
|
// LAMBDA: store double 2.0{{.+}}, double* [[G1_REF]]
|
|
|
|
// LAMBDA: [[SVAR_PTR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[ARG_PTR]], i{{[0-9]+}} 0, i{{[0-9]+}} 2
|
2015-09-16 02:56:58 +08:00
|
|
|
// LAMBDA: [[SVAR_REF:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[SVAR_PTR_REF]]
|
|
|
|
// LAMBDA: store i{{[0-9]+}} 4, i{{[0-9]+}}* [[SVAR_REF]]
|
2017-10-07 00:17:25 +08:00
|
|
|
// LAMBDA: [[SFVAR_PTR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[ARG_PTR]], i{{[0-9]+}} 0, i{{[0-9]+}} 3
|
2015-09-16 02:56:58 +08:00
|
|
|
// LAMBDA: [[SFVAR_REF:%.+]] = load float*, float** [[SFVAR_PTR_REF]]
|
|
|
|
// LAMBDA: store float 8.0{{.+}}, float* [[SFVAR_REF]]
|
2015-04-22 20:24:45 +08:00
|
|
|
}();
|
|
|
|
}
|
|
|
|
}();
|
|
|
|
return 0;
|
|
|
|
#elif defined(BLOCKS)
|
2018-02-24 03:30:48 +08:00
|
|
|
// BLOCKS: [[G:@.+]] = {{(dso_local )?}}global double
|
2015-04-22 20:24:45 +08:00
|
|
|
// BLOCKS-LABEL: @main
|
2015-06-30 01:29:50 +08:00
|
|
|
// BLOCKS: call {{.*}}void {{%.+}}(i8
|
2015-04-22 20:24:45 +08:00
|
|
|
^{
|
2015-09-16 02:56:58 +08:00
|
|
|
static float sfvar;
|
2015-04-22 20:24:45 +08:00
|
|
|
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*
|
2015-09-10 16:12:02 +08:00
|
|
|
// BLOCKS: call {{.*}}void {{.+}} @__kmpc_fork_call({{.+}}, i32 0, {{.+}}* [[OMP_REGION:@.+]] to {{.+}})
|
2015-04-22 20:24:45 +08:00
|
|
|
#pragma omp parallel
|
2015-09-16 02:56:58 +08:00
|
|
|
#pragma omp for private(g, g1, svar, sfvar)
|
2015-04-22 20:24:45 +08:00
|
|
|
for (int i = 0; i < 2; ++i) {
|
2015-09-10 16:12:02 +08:00
|
|
|
// BLOCKS: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* noalias %{{.+}}, i32* noalias %{{.+}})
|
2015-04-22 20:24:45 +08:00
|
|
|
// BLOCKS: [[G_PRIVATE_ADDR:%.+]] = alloca double,
|
2015-09-16 02:56:58 +08:00
|
|
|
// BLOCKS: [[SVAR_PRIVATE_ADDR:%.+]] = alloca i{{[0-9]+}},
|
|
|
|
// BLOCKS: [[SFVAR_PRIVATE_ADDR:%.+]] = alloca float,
|
2015-04-22 20:24:45 +08:00
|
|
|
g = 1;
|
2015-09-04 19:26:21 +08:00
|
|
|
g1 = 1;
|
2015-09-16 02:56:58 +08:00
|
|
|
svar = 2;
|
|
|
|
sfvar = 3.0;
|
2015-06-30 01:29:50 +08:00
|
|
|
// BLOCKS: call {{.*}}void @__kmpc_for_static_init_4(
|
2015-07-14 18:32:29 +08:00
|
|
|
// BLOCKS: store double 1.0{{.+}}, double* [[G_PRIVATE_ADDR]],
|
2015-04-22 20:24:45 +08:00
|
|
|
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
2015-09-16 02:56:58 +08:00
|
|
|
// BLOCKS: store i{{[0-9]+}} 2, i{{[0-9]+}}* [[SVAR_PRIVATE_ADDR]],
|
|
|
|
// BLOCKS-NOT: [[SVAR]]{{[[^:word:]]}}
|
|
|
|
// BLOCKS: store float 3.0{{.+}}, float* [[SFVAR_PRIVATE_ADDR]],
|
|
|
|
// BLOCKS-NOT: [[SFVAR]]{{[[^:word:]]}}
|
2015-04-22 20:24:45 +08:00
|
|
|
// BLOCKS: double* [[G_PRIVATE_ADDR]]
|
|
|
|
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
2015-09-16 02:56:58 +08:00
|
|
|
// BLOCKS: i{{[0-9]+}}* [[SVAR_PRIVATE_ADDR]]
|
|
|
|
// BLOCKS-NOT: [[SVAR]]{{[[^:word:]]}}
|
|
|
|
// BLOCKS: float* [[SFVAR_PRIVATE_ADDR]]
|
|
|
|
// BLOCKS-NOT: [[SFVAR]]{{[[^:word:]]}}
|
2015-06-30 01:29:50 +08:00
|
|
|
// BLOCKS: call {{.*}}void {{%.+}}(i8
|
|
|
|
// BLOCKS: call {{.*}}void @__kmpc_for_static_fini(
|
2015-04-22 20:24:45 +08:00
|
|
|
^{
|
|
|
|
// BLOCKS: define {{.+}} void {{@.+}}(i8*
|
|
|
|
g = 2;
|
2015-09-04 19:26:21 +08:00
|
|
|
g1 = 2;
|
2015-09-16 02:56:58 +08:00
|
|
|
svar = 4;
|
|
|
|
sfvar = 9.0;
|
2015-04-22 20:24:45 +08:00
|
|
|
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
2015-07-14 18:32:29 +08:00
|
|
|
// BLOCKS: store double 2.0{{.+}}, double*
|
2015-04-22 20:24:45 +08:00
|
|
|
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
2015-09-16 02:56:58 +08:00
|
|
|
// BLOCKS-NOT: [[SVAR]]{{[[^:word:]]}}
|
|
|
|
// BLOCKS: store i{{[0-9]+}} 4, i{{[0-9]+}}*
|
|
|
|
// BLOCKS-NOT: [[SVAR]]{{[[^:word:]]}}
|
|
|
|
// BLOCKS-NOT: [[SFVAR]]{{[[^:word:]]}}
|
|
|
|
// BLOCKS: store float 9.0{{.+}}, float*
|
|
|
|
// BLOCKS-NOT: [[SFVAR]]{{[[^:word:]]}}
|
2015-04-22 20:24:45 +08:00
|
|
|
// BLOCKS: ret
|
|
|
|
}();
|
|
|
|
}
|
|
|
|
}();
|
|
|
|
return 0;
|
|
|
|
#else
|
|
|
|
S<float> test;
|
|
|
|
int t_var = 0;
|
|
|
|
int vec[] = {1, 2};
|
|
|
|
S<float> s_arr[] = {1, 2};
|
2015-09-04 19:26:21 +08:00
|
|
|
S<float> &var = test;
|
2015-04-22 20:24:45 +08:00
|
|
|
#pragma omp parallel
|
2015-09-16 02:56:58 +08:00
|
|
|
#pragma omp for private(t_var, vec, s_arr, s_arr, var, var, svar)
|
2015-04-22 20:24:45 +08:00
|
|
|
for (int i = 0; i < 2; ++i) {
|
|
|
|
vec[i] = t_var;
|
|
|
|
s_arr[i] = var;
|
|
|
|
}
|
2015-04-28 21:20:05 +08:00
|
|
|
int i;
|
|
|
|
#pragma omp parallel
|
|
|
|
#pragma omp for private(i)
|
|
|
|
for (i = 0; i < 2; ++i) {
|
|
|
|
;
|
|
|
|
}
|
2015-04-22 20:24:45 +08:00
|
|
|
return tmain<int>();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: define i{{[0-9]+}} @main()
|
|
|
|
// CHECK: [[TEST:%.+]] = alloca [[S_FLOAT_TY]],
|
2018-10-15 23:43:00 +08:00
|
|
|
// CHECK: call {{.*}} [[S_FLOAT_TY_DEF_CONSTR:@.+]]([[S_FLOAT_TY]]* [[TEST]])
|
2015-09-10 16:12:02 +08:00
|
|
|
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 0, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*)* [[MAIN_MICROTASK:@.+]] to void
|
2015-04-22 20:24:45 +08:00
|
|
|
// CHECK: = call i{{.+}} [[TMAIN_INT:@.+]]()
|
|
|
|
// CHECK: call void [[S_FLOAT_TY_DESTR:@.+]]([[S_FLOAT_TY]]*
|
|
|
|
// CHECK: ret
|
|
|
|
//
|
2015-09-10 16:12:02 +08:00
|
|
|
// CHECK: define internal void [[MAIN_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}})
|
2015-04-22 20:24:45 +08:00
|
|
|
// CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}},
|
|
|
|
// CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}],
|
|
|
|
// CHECK: [[S_ARR_PRIV:%.+]] = alloca [2 x [[S_FLOAT_TY]]],
|
|
|
|
// CHECK-NOT: alloca [2 x [[S_FLOAT_TY]]],
|
|
|
|
// CHECK: [[VAR_PRIV:%.+]] = alloca [[S_FLOAT_TY]],
|
|
|
|
// CHECK-NOT: alloca [[S_FLOAT_TY]],
|
2015-09-16 02:56:58 +08:00
|
|
|
// CHECK: [[S_VAR_PRIV:%.+]] = alloca i{{[0-9]+}},
|
2015-04-22 20:24:45 +08:00
|
|
|
// CHECK: store i{{[0-9]+}}* [[GTID_ADDR]], i{{[0-9]+}}** [[GTID_ADDR_REF:%.+]]
|
|
|
|
// CHECK-NOT: [[T_VAR_PRIV]]
|
|
|
|
// CHECK-NOT: [[VEC_PRIV]]
|
|
|
|
// CHECK: {{.+}}:
|
|
|
|
// CHECK: [[S_ARR_PRIV_ITEM:%.+]] = phi [[S_FLOAT_TY]]*
|
2018-10-15 23:43:00 +08:00
|
|
|
// CHECK: call {{.*}} [[S_FLOAT_TY_DEF_CONSTR]]([[S_FLOAT_TY]]* [[S_ARR_PRIV_ITEM]])
|
2015-04-22 20:24:45 +08:00
|
|
|
// CHECK-NOT: [[T_VAR_PRIV]]
|
|
|
|
// CHECK-NOT: [[VEC_PRIV]]
|
2018-10-15 23:43:00 +08:00
|
|
|
// CHECK: call {{.*}} [[S_FLOAT_TY_DEF_CONSTR]]([[S_FLOAT_TY]]* [[VAR_PRIV]])
|
2015-04-22 20:24:45 +08:00
|
|
|
// CHECK: call void @__kmpc_for_static_init_4(
|
|
|
|
// CHECK: call void @__kmpc_for_static_fini(
|
|
|
|
// CHECK-DAG: call void [[S_FLOAT_TY_DESTR]]([[S_FLOAT_TY]]* [[VAR_PRIV]])
|
|
|
|
// CHECK-DAG: call void [[S_FLOAT_TY_DESTR]]([[S_FLOAT_TY]]*
|
|
|
|
// CHECK: ret void
|
|
|
|
|
|
|
|
// CHECK: define {{.*}} i{{[0-9]+}} [[TMAIN_INT]]()
|
|
|
|
// CHECK: [[TEST:%.+]] = alloca [[S_INT_TY]],
|
2018-10-15 23:43:00 +08:00
|
|
|
// CHECK: call {{.*}} [[S_INT_TY_DEF_CONSTR:@.+]]([[S_INT_TY]]* [[TEST]])
|
2015-09-10 16:12:02 +08:00
|
|
|
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 0, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*)* [[TMAIN_MICROTASK:@.+]] to void
|
2015-04-22 20:24:45 +08:00
|
|
|
// CHECK: call void [[S_INT_TY_DESTR:@.+]]([[S_INT_TY]]*
|
|
|
|
// CHECK: ret
|
|
|
|
//
|
2015-09-10 16:12:02 +08:00
|
|
|
// CHECK: define internal void [[TMAIN_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}})
|
2015-04-22 20:24:45 +08:00
|
|
|
// CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}},
|
|
|
|
// CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}],
|
|
|
|
// CHECK: [[S_ARR_PRIV:%.+]] = alloca [2 x [[S_INT_TY]]],
|
|
|
|
// CHECK-NOT: alloca [2 x [[S_INT_TY]]],
|
|
|
|
// CHECK: [[VAR_PRIV:%.+]] = alloca [[S_INT_TY]],
|
|
|
|
// CHECK-NOT: alloca [[S_INT_TY]],
|
|
|
|
// CHECK: store i{{[0-9]+}}* [[GTID_ADDR]], i{{[0-9]+}}** [[GTID_ADDR_REF:%.+]]
|
|
|
|
// CHECK-NOT: [[T_VAR_PRIV]]
|
|
|
|
// CHECK-NOT: [[VEC_PRIV]]
|
|
|
|
// CHECK: {{.+}}:
|
|
|
|
// CHECK: [[S_ARR_PRIV_ITEM:%.+]] = phi [[S_INT_TY]]*
|
2018-10-15 23:43:00 +08:00
|
|
|
// CHECK: call {{.*}} [[S_INT_TY_DEF_CONSTR]]([[S_INT_TY]]* [[S_ARR_PRIV_ITEM]])
|
2015-04-22 20:24:45 +08:00
|
|
|
// CHECK-NOT: [[T_VAR_PRIV]]
|
|
|
|
// CHECK-NOT: [[VEC_PRIV]]
|
2018-10-15 23:43:00 +08:00
|
|
|
// CHECK: call {{.*}} [[S_INT_TY_DEF_CONSTR]]([[S_INT_TY]]* [[VAR_PRIV]])
|
2015-04-22 20:24:45 +08:00
|
|
|
// CHECK: call void @__kmpc_for_static_init_4(
|
|
|
|
// CHECK: call void @__kmpc_for_static_fini(
|
|
|
|
// CHECK-DAG: call void [[S_INT_TY_DESTR]]([[S_INT_TY]]* [[VAR_PRIV]])
|
|
|
|
// CHECK-DAG: call void [[S_INT_TY_DESTR]]([[S_INT_TY]]*
|
|
|
|
// CHECK: ret void
|
|
|
|
#endif
|
|
|
|
|