summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/parallel_for_codegen.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2017-12-22 21:01:52 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2017-12-22 21:01:52 +0000
commit8e769ee70b7b49208e7dde61b7f06cb58df1a380 (patch)
tree439b0e7a09e037384909f9aef52e372067c2cefe /clang/test/OpenMP/parallel_for_codegen.cpp
parent5cfffbc875de50d4b3f58b6ec9dbca99d50f0a80 (diff)
downloadbcm5719-llvm-8e769ee70b7b49208e7dde61b7f06cb58df1a380.tar.gz
bcm5719-llvm-8e769ee70b7b49208e7dde61b7f06cb58df1a380.zip
[OPENMP] Captured arguments of the capturable clauses by value.
If the clause is applied to the combined construct and has captured expression, try to capture this expression by value rather than by reference. llvm-svn: 321386
Diffstat (limited to 'clang/test/OpenMP/parallel_for_codegen.cpp')
-rw-r--r--clang/test/OpenMP/parallel_for_codegen.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/test/OpenMP/parallel_for_codegen.cpp b/clang/test/OpenMP/parallel_for_codegen.cpp
index 1773619bce2..db3a2de580d 100644
--- a/clang/test/OpenMP/parallel_for_codegen.cpp
+++ b/clang/test/OpenMP/parallel_for_codegen.cpp
@@ -15,10 +15,12 @@ void with_var_schedule() {
double a = 5;
// CHECK: [[CHUNK_SIZE:%.+]] = fptosi double %{{.+}}to i8
// CHECK: store i8 %{{.+}}, i8* [[CHUNK:%.+]],
-// CHECK: call void {{.+}} @__kmpc_fork_call({{.+}}, i8* [[CHUNK]])
+// CHECK: [[VAL:%.+]] = load i8, i8* [[CHUNK]],
+// CHECK: store i8 [[VAL]], i8*
+// CHECK: [[CHUNK:%.+]] = load i64, i64* %
+// CHECK: call void {{.+}} @__kmpc_fork_call({{.+}}, i64 [[CHUNK]])
-// CHECK: [[CHUNK:%.+]] = load i8*, i8** %
-// CHECK: [[CHUNK_VAL:%.+]] = load i8, i8* [[CHUNK]],
+// CHECK: [[CHUNK_VAL:%.+]] = load i8, i8* %
// CHECK: [[CHUNK_SIZE:%.+]] = sext i8 [[CHUNK_VAL]] to i64
// CHECK: call void @__kmpc_for_static_init_8u([[IDENT_T_TY]]* [[LOOP_LOC]], i32 [[GTID:%[^,]+]], i32 33, i32* [[IS_LAST:%[^,]+]], i64* [[OMP_LB:%[^,]+]], i64* [[OMP_UB:%[^,]+]], i64* [[OMP_ST:%[^,]+]], i64 1, i64 [[CHUNK_SIZE]])
// CHECK: call void @__kmpc_for_static_fini([[IDENT_T_TY]]* [[LOOP_LOC]], i32 [[GTID]])
OpenPOWER on IntegriCloud