diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2017-12-04 21:30:42 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-12-04 21:30:42 +0000 |
commit | d80ab9d1a5be9068183b4433d417c61fdf02e179 (patch) | |
tree | d60db68f9b6c7082b0dd2dd94b540fb15151ee45 | |
parent | b873ee35bb7121eadda09a249db2b20c58b8ab1f (diff) | |
download | clang-d80ab9d1a5be9068183b4433d417c61fdf02e179.tar.gz |
[OPENMP] Fix PR35486: crash when collapsing loops with dependent iteration spaces.
Though it is incorrect from point of view of OpenMP standard to have
dependent iteration space in OpenMP loops, compiler should not crash.
Patch fixes this problem.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319700 91177308-0d34-0410-b5e6-96231b3b80d8
28 files changed, 97 insertions, 16 deletions
diff --git a/lib/CodeGen/CGStmtOpenMP.cpp b/lib/CodeGen/CGStmtOpenMP.cpp index 72847fa282..f96d4f3fd6 100644 --- a/lib/CodeGen/CGStmtOpenMP.cpp +++ b/lib/CodeGen/CGStmtOpenMP.cpp @@ -121,6 +121,9 @@ public: /// of used expression from loop statement. class OMPLoopScope : public CodeGenFunction::RunCleanupsScope { void emitPreInitStmt(CodeGenFunction &CGF, const OMPLoopDirective &S) { + CodeGenFunction::OMPPrivateScope PreCondScope(CGF); + CGF.EmitOMPPrivateLoopCounters(S, PreCondScope); + (void)PreCondScope.Privatize(); if (auto *LD = dyn_cast<OMPLoopDirective>(&S)) { if (auto *PreInits = cast_or_null<DeclStmt>(LD->getPreInits())) { for (const auto *I : PreInits->decls()) diff --git a/test/OpenMP/distribute_firstprivate_codegen.cpp b/test/OpenMP/distribute_firstprivate_codegen.cpp index 718fc87525..eaeb46988e 100644 --- a/test/OpenMP/distribute_firstprivate_codegen.cpp +++ b/test/OpenMP/distribute_firstprivate_codegen.cpp @@ -222,6 +222,7 @@ int main() { // CHECK: {{.*}} = alloca i{{[0-9]+}}, // CHECK: {{.*}} = alloca i{{[0-9]+}}, // CHECK: {{.*}} = alloca i{{[0-9]+}}, +// CHECK: {{.*}} = alloca i{{[0-9]+}}, // CHECK-DAG: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK-DAG: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -318,6 +319,7 @@ int main() { // CHECK: {{.*}} = alloca i{{[0-9]+}}, // CHECK: {{.*}} = alloca i{{[0-9]+}}, // CHECK: {{.*}} = alloca i{{[0-9]+}}, +// CHECK: {{.*}} = alloca i{{[0-9]+}}, // CHECK-DAG: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK-DAG: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], diff --git a/test/OpenMP/distribute_lastprivate_codegen.cpp b/test/OpenMP/distribute_lastprivate_codegen.cpp index abcbfd8d69..bd9dae956f 100644 --- a/test/OpenMP/distribute_lastprivate_codegen.cpp +++ b/test/OpenMP/distribute_lastprivate_codegen.cpp @@ -74,6 +74,7 @@ int main() { // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, + // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G_PRIVATE:%.+]] = alloca double, // LAMBDA: [[G1_PRIVATE:%.+]] = alloca double, @@ -202,6 +203,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -303,6 +305,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST1:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV1:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV1:%.+]] = alloca [2 x i{{[0-9]+}}], diff --git a/test/OpenMP/distribute_parallel_for_lastprivate_codegen.cpp b/test/OpenMP/distribute_parallel_for_lastprivate_codegen.cpp index 2e8da79c03..506885809a 100644 --- a/test/OpenMP/distribute_parallel_for_lastprivate_codegen.cpp +++ b/test/OpenMP/distribute_parallel_for_lastprivate_codegen.cpp @@ -74,6 +74,7 @@ int main() { // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, + // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G_PRIVATE:%.+]] = alloca double, // LAMBDA: [[G1_PRIVATE:%.+]] = alloca double, @@ -141,6 +142,7 @@ int main() { // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, + // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // private alloca's // LAMBDA: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, @@ -273,6 +275,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -371,6 +374,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -486,6 +490,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -566,6 +571,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], diff --git a/test/OpenMP/distribute_parallel_for_simd_lastprivate_codegen.cpp b/test/OpenMP/distribute_parallel_for_simd_lastprivate_codegen.cpp index 5b34622c55..a2ae550cde 100644 --- a/test/OpenMP/distribute_parallel_for_simd_lastprivate_codegen.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_lastprivate_codegen.cpp @@ -74,6 +74,7 @@ int main() { // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, + // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G_PRIVATE:%.+]] = alloca double, // LAMBDA: [[G1_PRIVATE:%.+]] = alloca double, @@ -150,6 +151,7 @@ int main() { // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, + // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // private alloca's // LAMBDA: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, @@ -283,6 +285,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -381,6 +384,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -496,6 +500,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -576,6 +581,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], diff --git a/test/OpenMP/distribute_simd_firstprivate_codegen.cpp b/test/OpenMP/distribute_simd_firstprivate_codegen.cpp index 8db26a4c05..fad709f382 100644 --- a/test/OpenMP/distribute_simd_firstprivate_codegen.cpp +++ b/test/OpenMP/distribute_simd_firstprivate_codegen.cpp @@ -222,6 +222,7 @@ int main() { // CHECK: {{.*}} = alloca i{{[0-9]+}}, // CHECK: {{.*}} = alloca i{{[0-9]+}}, // CHECK: {{.*}} = alloca i{{[0-9]+}}, +// CHECK: {{.*}} = alloca i{{[0-9]+}}, // CHECK-DAG: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK-DAG: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -318,6 +319,7 @@ int main() { // CHECK: {{.*}} = alloca i{{[0-9]+}}, // CHECK: {{.*}} = alloca i{{[0-9]+}}, // CHECK: {{.*}} = alloca i{{[0-9]+}}, +// CHECK: {{.*}} = alloca i{{[0-9]+}}, // CHECK-DAG: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK-DAG: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], diff --git a/test/OpenMP/distribute_simd_lastprivate_codegen.cpp b/test/OpenMP/distribute_simd_lastprivate_codegen.cpp index bc4604d1c2..df842a0098 100644 --- a/test/OpenMP/distribute_simd_lastprivate_codegen.cpp +++ b/test/OpenMP/distribute_simd_lastprivate_codegen.cpp @@ -74,6 +74,7 @@ int main() { // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, + // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G_PRIVATE:%.+]] = alloca double, // LAMBDA: [[G1_PRIVATE:%.+]] = alloca double, @@ -213,6 +214,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -314,6 +316,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST1:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV1:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV1:%.+]] = alloca [2 x i{{[0-9]+}}], diff --git a/test/OpenMP/distribute_simd_reduction_codegen.cpp b/test/OpenMP/distribute_simd_reduction_codegen.cpp index c061ba926b..8485d8d27d 100644 --- a/test/OpenMP/distribute_simd_reduction_codegen.cpp +++ b/test/OpenMP/distribute_simd_reduction_codegen.cpp @@ -57,6 +57,7 @@ int main() { // LAMBDA: alloca i{{.+}}, // LAMBDA: alloca i{{.+}}, // LAMBDA: alloca i{{.+}}, + // LAMBDA: alloca i{{.+}}, // LAMBDA: [[SIVAR_PRIV:%.+]] = alloca i{{.+}}, // LAMBDA: store{{.+}} [[SIVAR_ARG]], {{.+}} [[SIVAR_ADDR]], // LAMBDA: [[SIVAR_REF:%.+]] = load{{.+}}, {{.+}} [[SIVAR_ADDR]] @@ -132,6 +133,7 @@ int main() { // CHECK: alloca i{{.+}}, // CHECK: alloca i{{.+}}, // CHECK: alloca i{{.+}}, +// CHECK: alloca i{{.+}}, // CHECK: [[SIVAR_PRIV:%.+]] = alloca i{{.+}}, // CHECK: store{{.+}} [[SIVAR_ARG]], {{.+}} [[SIVAR_ADDR]], // CHECK: [[SIVAR_REF:%.+]] = load{{.+}}, {{.+}} [[SIVAR_ADDR]] @@ -176,6 +178,7 @@ int main() { // CHECK: alloca i{{.+}}, // CHECK: alloca i{{.+}}, // CHECK: alloca i{{.+}}, +// CHECK: alloca i{{.+}}, // CHECK: [[TVAR_PRIV:%.+]] = alloca i{{.+}}, // CHECK: store{{.+}} [[TVAR_ARG]], {{.+}} [[TVAR_ADDR]], // CHECK: [[TVAR_REF:%.+]] = load{{.+}}, {{.+}} [[TVAR_ADDR]] diff --git a/test/OpenMP/for_codegen.cpp b/test/OpenMP/for_codegen.cpp index 9ea167fb1f..6d719f4486 100644 --- a/test/OpenMP/for_codegen.cpp +++ b/test/OpenMP/for_codegen.cpp @@ -16,6 +16,16 @@ // CHECK-DAG: [[J:@.+]] = global i8 2, // CHECK-DAG: [[K:@.+]] = global i8 3, +// CHECK-LABEL: loop_with_counter_collapse +void loop_with_counter_collapse() { + // CHECK: call void @__kmpc_for_static_init_8(%ident_t* @ + // CHECK: call void @__kmpc_for_static_fini(%ident_t* @ + #pragma omp for collapse(2) + for (int i = 0; i < 4; i++) { + for (int j = i; j < 4; j++) { + } + } +} // CHECK-LABEL: define {{.*void}} @{{.*}}without_schedule_clause{{.*}}(float* {{.+}}, float* {{.+}}, float* {{.+}}, float* {{.+}}) void without_schedule_clause(float *a, float *b, float *c, float *d) { // CHECK: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num([[IDENT_T_TY]]* [[DEFAULT_LOC:[@%].+]]) @@ -330,8 +340,8 @@ void runtime(float *a, float *b, float *c, float *d) { // CHECK-LABEL: test_precond void test_precond() { // CHECK: [[A_ADDR:%.+]] = alloca i8, - // CHECK: [[CAP:%.+]] = alloca i8, // CHECK: [[I_ADDR:%.+]] = alloca i8, + // CHECK: [[CAP:%.+]] = alloca i8, char a = 0; // CHECK: store i8 0, // CHECK: store i32 diff --git a/test/OpenMP/for_firstprivate_codegen.cpp b/test/OpenMP/for_firstprivate_codegen.cpp index 590739203f..0f4b02a532 100644 --- a/test/OpenMP/for_firstprivate_codegen.cpp +++ b/test/OpenMP/for_firstprivate_codegen.cpp @@ -81,6 +81,7 @@ int main() { // LAMBDA: alloca i{{[0-9]+}}, // LAMBDA: alloca i{{[0-9]+}}, // LAMBDA: alloca i{{[0-9]+}}, + // LAMBDA: alloca i{{[0-9]+}}, // LAMBDA: [[G_PRIVATE_ADDR:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G1_PRIVATE_ADDR:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G1_PRIVATE_REF:%.+]] = alloca i{{[0-9]+}}*, @@ -154,6 +155,7 @@ int main() { // BLOCKS: alloca i{{[0-9]+}}, // BLOCKS: alloca i{{[0-9]+}}, // BLOCKS: alloca i{{[0-9]+}}, + // BLOCKS: alloca i{{[0-9]+}}, // BLOCKS: [[G_PRIVATE_ADDR:%.+]] = alloca i{{[0-9]+}}, // BLOCKS: [[G1_PRIVATE_ADDR:%.+]] = alloca i{{[0-9]+}}, // BLOCKS: [[SIVAR2_PRIVATE_ADDR:%.+]] = alloca i{{[0-9]+}}, @@ -218,6 +220,7 @@ int main() { // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, +// CHECK: alloca i{{[0-9]+}}, // 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]]], diff --git a/test/OpenMP/for_lastprivate_codegen.cpp b/test/OpenMP/for_lastprivate_codegen.cpp index 47c24ed102..7054c0e1c5 100644 --- a/test/OpenMP/for_lastprivate_codegen.cpp +++ b/test/OpenMP/for_lastprivate_codegen.cpp @@ -213,6 +213,7 @@ int main() { // LAMBDA: alloca i{{[0-9]+}}, // LAMBDA: alloca i{{[0-9]+}}, // LAMBDA: alloca i{{[0-9]+}}, + // LAMBDA: alloca i{{[0-9]+}}, // LAMBDA: [[A_PRIV:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[B_PRIV:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[C_PRIV:%.+]] = alloca i{{[0-9]+}}, @@ -407,6 +408,7 @@ int main() { // BLOCKS: alloca i{{[0-9]+}}, // BLOCKS: alloca i{{[0-9]+}}, // BLOCKS: alloca i{{[0-9]+}}, +// BLOCKS: alloca i{{[0-9]+}}, // BLOCKS: [[A_PRIV:%.+]] = alloca i{{[0-9]+}}, // BLOCKS: [[B_PRIV:%.+]] = alloca i{{[0-9]+}}, // BLOCKS: [[C_PRIV:%.+]] = alloca i{{[0-9]+}}, @@ -477,6 +479,7 @@ int main() { // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, +// CHECK: alloca i{{[0-9]+}}, // 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]]], @@ -673,6 +676,7 @@ int main() { // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, +// CHECK: alloca i{{[0-9]+}}, // CHECK: [[A_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[B_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[C_PRIV:%.+]] = alloca i{{[0-9]+}}, diff --git a/test/OpenMP/for_linear_codegen.cpp b/test/OpenMP/for_linear_codegen.cpp index 16a67c0b91..e25de36a6f 100644 --- a/test/OpenMP/for_linear_codegen.cpp +++ b/test/OpenMP/for_linear_codegen.cpp @@ -181,8 +181,8 @@ int main() { // LAMBDA: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* noalias %{{.+}}, i32* noalias %{{.+}}) // LAMBDA: alloca i{{[0-9]+}}, - // LAMBDA: [[G_START_ADDR:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: alloca i{{[0-9]+}}, + // LAMBDA: [[G_START_ADDR:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: alloca i{{[0-9]+}}, // LAMBDA: alloca i{{[0-9]+}}, // LAMBDA: alloca i{{[0-9]+}}, @@ -233,8 +233,8 @@ int main() { for (int i = 0; i < 2; ++i) { // BLOCKS: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* noalias %{{.+}}, i32* noalias %{{.+}}) // BLOCKS: alloca i{{[0-9]+}}, - // BLOCKS: [[G_START_ADDR:%.+]] = alloca i{{[0-9]+}}, // BLOCKS: alloca i{{[0-9]+}}, + // BLOCKS: [[G_START_ADDR:%.+]] = alloca i{{[0-9]+}}, // BLOCKS: alloca i{{[0-9]+}}, // BLOCKS: alloca i{{[0-9]+}}, // BLOCKS: alloca i{{[0-9]+}}, @@ -351,13 +351,13 @@ int main() { // CHECK: define internal void [[MAIN_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, float** dereferenceable(8) %{{.+}}, i64* dereferenceable(8) %{{.+}}) // CHECK: alloca i{{[0-9]+}}, +// CHECK: alloca i{{[0-9]+}}, // CHECK: [[PVAR_START:%.+]] = alloca float*, // CHECK: [[LVAR_START:%.+]] = alloca i64, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, -// CHECK: alloca i{{[0-9]+}}, // CHECK: [[PVAR_PRIV:%.+]] = alloca float*, // CHECK: [[LVAR_PRIV:%.+]] = alloca i64, // CHECK: store i{{[0-9]+}}* [[GTID_ADDR]], i{{[0-9]+}}** [[GTID_ADDR_REF:%.+]] @@ -446,13 +446,13 @@ int main() { // CHECK: define internal void [[TMAIN_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, i32** dereferenceable(8) %{{.+}}, i32* dereferenceable(4) %{{.+}}) // CHECK: alloca i{{[0-9]+}}, +// CHECK: alloca i{{[0-9]+}}, // CHECK: [[PVAR_START:%.+]] = alloca i32*, // CHECK: [[LVAR_START:%.+]] = alloca i32, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, -// CHECK: alloca i{{[0-9]+}}, // CHECK: [[PVAR_PRIV:%.+]] = alloca i32*, // CHECK: [[LVAR_PRIV:%.+]] = alloca i32, // CHECK: [[LVAR_PRIV_REF:%.+]] = alloca i32*, diff --git a/test/OpenMP/for_reduction_codegen.cpp b/test/OpenMP/for_reduction_codegen.cpp index 3f014a4530..68b9f5e83b 100644 --- a/test/OpenMP/for_reduction_codegen.cpp +++ b/test/OpenMP/for_reduction_codegen.cpp @@ -1211,6 +1211,7 @@ int main() { // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, +// CHECK: alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VAR_PRIV:%.+]] = alloca [[S_INT_TY]], // CHECK: [[VAR1_PRIV:%.+]] = alloca [[S_INT_TY]], diff --git a/test/OpenMP/for_reduction_codegen_UDR.cpp b/test/OpenMP/for_reduction_codegen_UDR.cpp index f5ec656048..63d0ee8aa2 100644 --- a/test/OpenMP/for_reduction_codegen_UDR.cpp +++ b/test/OpenMP/for_reduction_codegen_UDR.cpp @@ -806,6 +806,7 @@ int main() { // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, +// CHECK: alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VAR_PRIV:%.+]] = alloca [[S_INT_TY]], // CHECK: [[VAR1_PRIV:%.+]] = alloca [[S_INT_TY]], diff --git a/test/OpenMP/parallel_for_linear_codegen.cpp b/test/OpenMP/parallel_for_linear_codegen.cpp index d0968d7cd1..6e7a05991a 100644 --- a/test/OpenMP/parallel_for_linear_codegen.cpp +++ b/test/OpenMP/parallel_for_linear_codegen.cpp @@ -49,8 +49,8 @@ int main() { for (int i = 0; i < 2; ++i) { // LAMBDA: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* noalias %{{.+}}, i32* noalias %{{.+}}, i32* dereferenceable(4) %{{.+}}) // LAMBDA: alloca i{{[0-9]+}}, - // LAMBDA: [[G_START_ADDR:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: alloca i{{[0-9]+}}, + // LAMBDA: [[G_START_ADDR:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: alloca i{{[0-9]+}}, // LAMBDA: alloca i{{[0-9]+}}, // LAMBDA: alloca i{{[0-9]+}}, @@ -96,8 +96,8 @@ int main() { for (int i = 0; i < 2; ++i) { // BLOCKS: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* noalias %{{.+}}, i32* noalias %{{.+}}, i32* dereferenceable(4) %{{.+}}) // BLOCKS: alloca i{{[0-9]+}}, - // BLOCKS: [[G_START_ADDR:%.+]] = alloca i{{[0-9]+}}, // BLOCKS: alloca i{{[0-9]+}}, + // BLOCKS: [[G_START_ADDR:%.+]] = alloca i{{[0-9]+}}, // BLOCKS: alloca i{{[0-9]+}}, // BLOCKS: alloca i{{[0-9]+}}, // BLOCKS: alloca i{{[0-9]+}}, @@ -155,13 +155,13 @@ int main() { // CHECK: define internal void [[MAIN_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, float** dereferenceable(8) %{{.+}}, i64* dereferenceable(8) %{{.+}}) // CHECK: alloca i{{[0-9]+}}, +// CHECK: alloca i{{[0-9]+}}, // CHECK: [[PVAR_START:%.+]] = alloca float*, // CHECK: [[LVAR_START:%.+]] = alloca i64, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, -// CHECK: alloca i{{[0-9]+}}, // CHECK: [[PVAR_PRIV:%.+]] = alloca float*, // CHECK: [[LVAR_PRIV:%.+]] = alloca i64, // CHECK: store i{{[0-9]+}}* [[GTID_ADDR]], i{{[0-9]+}}** [[GTID_ADDR_REF:%.+]] @@ -205,13 +205,13 @@ int main() { // // CHECK: define internal void [[TMAIN_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, i32** dereferenceable(8) %{{.+}}, i32* dereferenceable(4) %{{.+}}) // CHECK: alloca i{{[0-9]+}}, +// CHECK: alloca i{{[0-9]+}}, // CHECK: [[PVAR_START:%.+]] = alloca i32*, // CHECK: [[LVAR_START:%.+]] = alloca i32, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, -// CHECK: alloca i{{[0-9]+}}, // CHECK: [[PVAR_PRIV:%.+]] = alloca i32*, // CHECK: [[LVAR_PRIV:%.+]] = alloca i32, // CHECK: store i{{[0-9]+}}* [[GTID_ADDR]], i{{[0-9]+}}** [[GTID_ADDR_REF:%.+]] diff --git a/test/OpenMP/taskloop_reduction_codegen.cpp b/test/OpenMP/taskloop_reduction_codegen.cpp index 10cbf97163..64e0ac3667 100644 --- a/test/OpenMP/taskloop_reduction_codegen.cpp +++ b/test/OpenMP/taskloop_reduction_codegen.cpp @@ -51,6 +51,7 @@ sum = 0.0; // CHECK: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON:%.*]], // CHECK: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%ident_t* // CHECK: [[DOTRD_INPUT_:%.*]] = alloca [4 x %struct.kmp_task_red_input_t], +// CHECK: alloca i32, // CHECK: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, // CHECK: [[DOTCAPTURE_EXPR_9:%.*]] = alloca i32, // CHECK: store i32 0, i32* [[RETVAL]], diff --git a/test/OpenMP/taskloop_simd_reduction_codegen.cpp b/test/OpenMP/taskloop_simd_reduction_codegen.cpp index b96c8d50a3..585e549754 100644 --- a/test/OpenMP/taskloop_simd_reduction_codegen.cpp +++ b/test/OpenMP/taskloop_simd_reduction_codegen.cpp @@ -51,6 +51,7 @@ sum = 0.0; // CHECK: [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON:%.*]], // CHECK: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%ident_t* // CHECK: [[DOTRD_INPUT_:%.*]] = alloca [4 x %struct.kmp_task_red_input_t], +// CHECK: alloca i32, // CHECK: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, // CHECK: [[DOTCAPTURE_EXPR_9:%.*]] = alloca i32, // CHECK: store i32 0, i32* [[RETVAL]], diff --git a/test/OpenMP/teams_distribute_collapse_codegen.cpp b/test/OpenMP/teams_distribute_collapse_codegen.cpp index f4c7a964bc..a65c0a2e63 100644 --- a/test/OpenMP/teams_distribute_collapse_codegen.cpp +++ b/test/OpenMP/teams_distribute_collapse_codegen.cpp @@ -35,6 +35,8 @@ struct SS{ // discard loop variables not needed here // CK1: = alloca i32, // CK1: = alloca i32, + // CK1: = alloca i32, + // CK1: = alloca i32, // CK1: [[OMP_UB:%.+]] = alloca i32, // CK1: store i32 56087, i32* [[OMP_UB]], // CK1: call void @__kmpc_for_static_init_4({{.+}}, {{.+}}, i32 92, {{.+}}, {{.+}}, i32* [[OMP_UB]], diff --git a/test/OpenMP/teams_distribute_lastprivate_codegen.cpp b/test/OpenMP/teams_distribute_lastprivate_codegen.cpp index f709b5b7b7..2eab60b9dd 100644 --- a/test/OpenMP/teams_distribute_lastprivate_codegen.cpp +++ b/test/OpenMP/teams_distribute_lastprivate_codegen.cpp @@ -71,6 +71,7 @@ int main() { // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, + // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G_PRIVATE:%.+]] = alloca double, // LAMBDA: [[G1_PRIVATE:%.+]] = alloca double, @@ -195,6 +196,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -293,6 +295,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST1:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV1:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV1:%.+]] = alloca [2 x i{{[0-9]+}}], diff --git a/test/OpenMP/teams_distribute_parallel_for_firstprivate_codegen.cpp b/test/OpenMP/teams_distribute_parallel_for_firstprivate_codegen.cpp index 55ef18fc6b..fa99f9cfcf 100644 --- a/test/OpenMP/teams_distribute_parallel_for_firstprivate_codegen.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_firstprivate_codegen.cpp @@ -132,6 +132,7 @@ int main() { // LAMBDA: alloca i32, // LAMBDA: alloca i32, // LAMBDA: alloca i32, + // LAMBDA: alloca i32, // LAMBDA: [[G_PRIV:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G1_PRIV:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G1_TMP_PRIV:%.+]] = alloca i{{[0-9]+}}*, diff --git a/test/OpenMP/teams_distribute_parallel_for_lastprivate_codegen.cpp b/test/OpenMP/teams_distribute_parallel_for_lastprivate_codegen.cpp index 57e98f1b5c..501abb725b 100644 --- a/test/OpenMP/teams_distribute_parallel_for_lastprivate_codegen.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_lastprivate_codegen.cpp @@ -71,6 +71,7 @@ int main() { // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, + // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G_PRIVATE:%.+]] = alloca double, // LAMBDA: [[G1_PRIVATE:%.+]] = alloca double, @@ -125,6 +126,7 @@ int main() { // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, + // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G_PRIVATE:%.+]] = alloca double, // LAMBDA: [[G1_PRIVATE:%.+]] = alloca double, @@ -248,6 +250,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -326,6 +329,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -425,6 +429,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST1:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV1:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV1:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -501,6 +506,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST1:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV1:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV1:%.+]] = alloca [2 x i{{[0-9]+}}], diff --git a/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp b/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp index 97541315bf..8051cfcc4e 100644 --- a/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp @@ -91,6 +91,7 @@ int main() { // LAMBDA: alloca i32, // LAMBDA: alloca i32, // LAMBDA: alloca i32, + // LAMBDA: alloca i32, // LAMBDA: [[G_PRIV:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G1_PRIV:%.+]] = alloca i{{[0-9]+}} // LAMBDA: [[TMP:%.+]] = alloca i{{[0-9]+}}*, @@ -116,6 +117,7 @@ int main() { // LAMBDA: alloca i32, // LAMBDA: alloca i32, // LAMBDA: alloca i32, + // LAMBDA: alloca i32, // LAMBDA: [[G_PRIV:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G1_PRIV:%.+]] = alloca i{{[0-9]+}} // LAMBDA: [[TMP:%.+]] = alloca i{{[0-9]+}}*, @@ -212,6 +214,7 @@ int main() { // CHECK: {{.+}} = alloca i32, // CHECK: {{.+}} = alloca i32, // CHECK: {{.+}} = alloca i32, +// CHECK: {{.+}} = alloca i32, // CHECK-DAG: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK-DAG: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], // CHECK-DAG: [[S_ARR_PRIV:%.+]] = alloca [2 x [[S_FLOAT_TY]]], @@ -255,12 +258,12 @@ int main() { // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, +// CHECK: alloca i32, // 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: [[VAR_PRIV:%.+]] = alloca [[S_INT_TY]], // CHECK: [[TMP:%.+]] = alloca [[S_INT_TY]]*, -// CHECK: alloca i32, // private(s_arr) // CHECK-DAG: [[S_ARR_PRIV_BGN:%.+]] = getelementptr{{.*}} [2 x [[S_INT_TY]]], [2 x [[S_INT_TY]]]* [[S_ARR_PRIV]], @@ -295,12 +298,12 @@ int main() { // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, +// CHECK: alloca i32, // 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: [[VAR_PRIV:%.+]] = alloca [[S_INT_TY]], // CHECK: [[TMP:%.+]] = alloca [[S_INT_TY]]*, -// CHECK: alloca i32, // private(s_arr) // CHECK-DAG: [[S_ARR_PRIV_BGN:%.+]] = getelementptr{{.*}} [2 x [[S_INT_TY]]], [2 x [[S_INT_TY]]]* [[S_ARR_PRIV]], diff --git a/test/OpenMP/teams_distribute_parallel_for_reduction_codegen.cpp b/test/OpenMP/teams_distribute_parallel_for_reduction_codegen.cpp index 09dc3ec8e1..55ccfff99a 100644 --- a/test/OpenMP/teams_distribute_parallel_for_reduction_codegen.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_reduction_codegen.cpp @@ -96,6 +96,7 @@ int main() { // LAMBDA: alloca i32, // LAMBDA: alloca i32, // LAMBDA: alloca i32, + // LAMBDA: alloca i32, // LAMBDA: [[SIVAR_PRIV:%.+]] = alloca i{{.+}}, // LAMBDA: [[RED_LIST:%.+]] = alloca [1 x {{.+}}], // LAMBDA: store{{.+}} [[SIVAR_ARG]], {{.+}} [[SIVAR_ADDR]], @@ -219,6 +220,7 @@ int main() { // CHECK: alloca i32, // CHECK: alloca i32, // CHECK: alloca i32, +// CHECK: alloca i32, // CHECK: [[SIVAR_PRIV:%.+]] = alloca i{{.+}}, // CHECK: [[RED_LIST:%.+]] = alloca [1 x {{.+}}], // CHECK: store{{.+}} [[SIVAR_ARG]], {{.+}} [[SIVAR_ADDR]], @@ -310,6 +312,7 @@ int main() { // CHECK: alloca i32, // CHECK: alloca i32, // CHECK: alloca i32, +// CHECK: alloca i32, // CHECK: [[TVAR_PRIV:%.+]] = alloca i{{.+}}, // CHECK: [[RED_LIST:%.+]] = alloca [1 x {{.+}}], // CHECK: store{{.+}} [[TVAR_ARG]], {{.+}} [[TVAR_ADDR]], diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_codegen.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_codegen.cpp index ffcd981b39..1219742c75 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_codegen.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_codegen.cpp @@ -132,6 +132,7 @@ int main() { // LAMBDA: alloca i32, // LAMBDA: alloca i32, // LAMBDA: alloca i32, + // LAMBDA: alloca i32, // LAMBDA: [[G_PRIV:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G1_PRIV:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G1_TMP_PRIV:%.+]] = alloca i{{[0-9]+}}*, diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_codegen.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_codegen.cpp index 81ec2ff628..5df893d525 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_codegen.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_codegen.cpp @@ -71,6 +71,7 @@ int main() { // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, + // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G_PRIVATE:%.+]] = alloca double, // LAMBDA: [[G1_PRIVATE:%.+]] = alloca double, @@ -126,6 +127,7 @@ int main() { // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, + // LAMBDA: {{.+}} = alloca i{{[0-9]+}}, // LAMBDA: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G_PRIVATE:%.+]] = alloca double, // LAMBDA: [[G1_PRIVATE:%.+]] = alloca double, @@ -255,6 +257,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -333,6 +336,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -435,6 +439,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST1:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV1:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV1:%.+]] = alloca [2 x i{{[0-9]+}}], @@ -511,6 +516,7 @@ int main() { // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: {{.+}} = alloca i{{[0-9]+}}, +// CHECK: {{.+}} = alloca i{{[0-9]+}}, // CHECK: [[OMP_IS_LAST1:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[T_VAR_PRIV1:%.+]] = alloca i{{[0-9]+}}, // CHECK: [[VEC_PRIV1:%.+]] = alloca [2 x i{{[0-9]+}}], diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp index d133fbea76..156966656e 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp @@ -91,6 +91,7 @@ int main() { // LAMBDA: alloca i32, // LAMBDA: alloca i32, // LAMBDA: alloca i32, + // LAMBDA: alloca i32, // LAMBDA: [[G_PRIV:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G1_PRIV:%.+]] = alloca i{{[0-9]+}} // LAMBDA: [[TMP:%.+]] = alloca i{{[0-9]+}}*, @@ -116,6 +117,7 @@ int main() { // LAMBDA: alloca i32, // LAMBDA: alloca i32, // LAMBDA: alloca i32, + // LAMBDA: alloca i32, // LAMBDA: [[G_PRIV:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G1_PRIV:%.+]] = alloca i{{[0-9]+}} // LAMBDA: [[TMP:%.+]] = alloca i{{[0-9]+}}*, @@ -215,6 +217,7 @@ int main() { // CHECK: {{.+}} = alloca i32, // CHECK: {{.+}} = alloca i32, // CHECK: {{.+}} = alloca i32, +// CHECK: {{.+}} = alloca i32, // CHECK-DAG: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK-DAG: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], // CHECK-DAG: [[S_ARR_PRIV:%.+]] = alloca [2 x [[S_FLOAT_TY]]], @@ -258,12 +261,12 @@ int main() { // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, +// CHECK: alloca i{{[0-9]+}}, // 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: [[VAR_PRIV:%.+]] = alloca [[S_INT_TY]], // CHECK: [[TMP:%.+]] = alloca [[S_INT_TY]]*, -// CHECK: alloca i32, // private(s_arr) // CHECK-DAG: [[S_ARR_PRIV_BGN:%.+]] = getelementptr{{.*}} [2 x [[S_INT_TY]]], [2 x [[S_INT_TY]]]* [[S_ARR_PRIV]], @@ -298,12 +301,12 @@ int main() { // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, +// CHECK: alloca i32, // 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: [[VAR_PRIV:%.+]] = alloca [[S_INT_TY]], // CHECK: [[TMP:%.+]] = alloca [[S_INT_TY]]*, -// CHECK: alloca i32, // private(s_arr) // CHECK-DAG: [[S_ARR_PRIV_BGN:%.+]] = getelementptr{{.*}} [2 x [[S_INT_TY]]], [2 x [[S_INT_TY]]]* [[S_ARR_PRIV]], diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_reduction_codegen.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_reduction_codegen.cpp index 09fc4b750f..384ac4b5f3 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_reduction_codegen.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_reduction_codegen.cpp @@ -96,6 +96,7 @@ int main() { // LAMBDA: alloca i32, // LAMBDA: alloca i32, // LAMBDA: alloca i32, + // LAMBDA: alloca i32, // LAMBDA: [[SIVAR_PRIV:%.+]] = alloca i{{.+}}, // LAMBDA: [[RED_LIST:%.+]] = alloca [1 x {{.+}}], // LAMBDA: store{{.+}} [[SIVAR_ARG]], {{.+}} [[SIVAR_ADDR]], @@ -103,7 +104,7 @@ int main() { // LAMBDA: store{{.+}} 0, {{.+}} [[SIVAR_PRIV]], // LAMBDA: call void @__kmpc_for_static_init_4( - // LAMBDA: store{{.+}}, {{.+}} [[SIVAR_PRIV]], + // LAMBDA: store{{.+}}, {{.+}} [[SIVAR_PRIV]], // LAMBDA: call void [[INNER_LAMBDA:@.+]]( // LAMBDA: call void @__kmpc_for_static_fini( // LAMBDA: [[RED_LIST_GEP:%.+]] = getelementptr{{.+}} [[RED_LIST]], @@ -222,6 +223,7 @@ int main() { // CHECK: alloca i32, // CHECK: alloca i32, // CHECK: alloca i32, +// CHECK: alloca i32, // CHECK: [[SIVAR_PRIV:%.+]] = alloca i{{.+}}, // CHECK: [[RED_LIST:%.+]] = alloca [1 x {{.+}}], // CHECK: store{{.+}} [[SIVAR_ARG]], {{.+}} [[SIVAR_ADDR]], @@ -313,6 +315,7 @@ int main() { // CHECK: alloca i32, // CHECK: alloca i32, // CHECK: alloca i32, +// CHECK: alloca i32, // CHECK: [[TVAR_PRIV:%.+]] = alloca i{{.+}}, // CHECK: [[RED_LIST:%.+]] = alloca [1 x {{.+}}], // CHECK: store{{.+}} [[TVAR_ARG]], {{.+}} [[TVAR_ADDR]], diff --git a/test/OpenMP/teams_distribute_private_codegen.cpp b/test/OpenMP/teams_distribute_private_codegen.cpp index 23d1b9067e..38a391d056 100644 --- a/test/OpenMP/teams_distribute_private_codegen.cpp +++ b/test/OpenMP/teams_distribute_private_codegen.cpp @@ -91,6 +91,7 @@ int main() { // LAMBDA: alloca i32, // LAMBDA: alloca i32, // LAMBDA: alloca i32, + // LAMBDA: alloca i32, // LAMBDA: [[G_PRIV:%.+]] = alloca i{{[0-9]+}}, // LAMBDA: [[G1_PRIV:%.+]] = alloca i{{[0-9]+}} // LAMBDA: [[TMP:%.+]] = alloca i{{[0-9]+}}*, @@ -159,12 +160,12 @@ int main() { // CHECK: {{.+}} = alloca i32, // CHECK: {{.+}} = alloca i32, // CHECK: {{.+}} = alloca i32, +// CHECK: {{.+}} = alloca i32, // CHECK-DAG: [[T_VAR_PRIV:%.+]] = alloca i{{[0-9]+}}, // CHECK-DAG: [[VEC_PRIV:%.+]] = alloca [2 x i{{[0-9]+}}], // CHECK-DAG: [[S_ARR_PRIV:%.+]] = alloca [2 x [[S_FLOAT_TY]]], // CHECK-DAG: [[VAR_PRIV:%.+]] = alloca [[S_FLOAT_TY]], // CHECK-DAG: [[SIVAR_PRIV:%.+]] = alloca i{{[0-9]+}}, -// CHECK: alloca i32, // private(s_arr) // CHECK-DAG: [[S_ARR_PRIV_BGN:%.+]] = getelementptr{{.*}} [2 x [[S_FLOAT_TY]]], [2 x [[S_FLOAT_TY]]]* [[S_ARR_PRIV]], @@ -203,12 +204,12 @@ int main() { // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, // CHECK: alloca i{{[0-9]+}}, +// CHECK: alloca i{{[0-9]+}}, // 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: [[VAR_PRIV:%.+]] = alloca [[S_INT_TY]], // CHECK: [[TMP:%.+]] = alloca [[S_INT_TY]]*, -// CHECK: alloca i32, // private(s_arr) // CHECK-DAG: [[S_ARR_PRIV_BGN:%.+]] = getelementptr{{.*}} [2 x [[S_INT_TY]]], [2 x [[S_INT_TY]]]* [[S_ARR_PRIV]], |