diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-05-24 07:40:12 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-05-24 07:40:12 +0000 |
commit | 9afe57541e4194e947876617ecc993d309214b99 (patch) | |
tree | 9d4891ef75f2bc4cee71f5e28a70907d39a7198e /clang/test/OpenMP/single_firstprivate_codegen.cpp | |
parent | 6194d9f5d8a295f2e36e9bf9dc135abb1dbfa002 (diff) | |
download | bcm5719-llvm-9afe57541e4194e947876617ecc993d309214b99.tar.gz bcm5719-llvm-9afe57541e4194e947876617ecc993d309214b99.zip |
[OPENMP] Fixed codegen for firstprivate vars in standalone worksharing
directives.
If firstprivate variable is is captured by value in outlined region and then used as firstprivate variable in inner worksharing directive, the copy for this firstprivate variable was not created. Fixed this bug.
llvm-svn: 270536
Diffstat (limited to 'clang/test/OpenMP/single_firstprivate_codegen.cpp')
-rw-r--r-- | clang/test/OpenMP/single_firstprivate_codegen.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/OpenMP/single_firstprivate_codegen.cpp b/clang/test/OpenMP/single_firstprivate_codegen.cpp index 1e91fd8c843..dc1e1f9e7ac 100644 --- a/clang/test/OpenMP/single_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/single_firstprivate_codegen.cpp @@ -228,6 +228,7 @@ int main() { // CHECK: ret // // CHECK: define internal void [[TMAIN_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, i32 {{.*}}%{{.+}}, [2 x i32]* dereferenceable(8) %{{.+}}, [2 x [[S_INT_TY]]]* dereferenceable(8) %{{.+}}, [[S_INT_TY]]* dereferenceable(4) %{{.+}}) +// 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]]], @@ -244,7 +245,8 @@ int main() { // CHECK: call i32 @__kmpc_single( // firstprivate t_var(t_var) -// CHECK-NOT: load i{{[0-9]+}}, i{{[0-9]+}}* +// CHECK: [[T_VAR_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* +// CHECK: store i{{[0-9]+}} [[T_VAR_VAL]], i{{[0-9]+}}* [[T_VAR_PRIV]], // firstprivate vec(vec) // CHECK: [[VEC_DEST:%.+]] = bitcast [2 x i{{[0-9]+}}]* [[VEC_PRIV]] to i8* |