summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/sections_lastprivate_codegen.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2016-01-22 08:56:50 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2016-01-22 08:56:50 +0000
commit3015bcc62aa4fc948dd02736f525df4b5d18e8fb (patch)
treee4e194cff0be6799df9dcac9b9f4099b63664423 /clang/test/OpenMP/sections_lastprivate_codegen.cpp
parent40038d2d1eef3994c64aaebc61316999e5269ee9 (diff)
downloadbcm5719-llvm-3015bcc62aa4fc948dd02736f525df4b5d18e8fb.tar.gz
bcm5719-llvm-3015bcc62aa4fc948dd02736f525df4b5d18e8fb.zip
[OPENMP] Generalize codegen for 'sections'-based directive.
If 'sections' directive has only one sub-section, the code for 'single'-based directive was emitted. Removed this codegen, because it causes crashes in different cases. llvm-svn: 258495
Diffstat (limited to 'clang/test/OpenMP/sections_lastprivate_codegen.cpp')
-rw-r--r--clang/test/OpenMP/sections_lastprivate_codegen.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/clang/test/OpenMP/sections_lastprivate_codegen.cpp b/clang/test/OpenMP/sections_lastprivate_codegen.cpp
index a1ff007fd61..6ee9f63b4bd 100644
--- a/clang/test/OpenMP/sections_lastprivate_codegen.cpp
+++ b/clang/test/OpenMP/sections_lastprivate_codegen.cpp
@@ -23,7 +23,6 @@ volatile int g = 1212;
// CHECK: [[S_FLOAT_TY:%.+]] = type { float }
// CHECK [[CAP_MAIN_TY:%.+]] = type { i{{[0-9]+}}*, [2 x i{{[0-9]+}}]*, [2 x [[S_FLOAT_TY]]]*, [[S_FLOAT_TY]]*, i{{[0-9]+}}* }
// CHECK: [[S_INT_TY:%.+]] = type { i32 }
-// CHECK-DAG: [[SINGLE_BARRIER_LOC:@.+]] = private unnamed_addr constant %{{.+}} { i32 0, i32 322, i32 0, i32 0, i8*
// CHECK-DAG: [[SECTIONS_BARRIER_LOC:@.+]] = private unnamed_addr constant %{{.+}} { i32 0, i32 194, i32 0, i32 0, i8*
// CHECK-DAG: [[X:@.+]] = global double 0.0
template <typename T>
@@ -234,27 +233,29 @@ int main() {
// CHECK: ret
// CHECK: define internal void [[MAIN_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}},
-// CHECK-NOT: alloca i{{[0-9]+}},
-// CHECK-NOT: alloca [2 x i{{[0-9]+}}],
-// CHECK-NOT: alloca [2 x [[S_FLOAT_TY]]],
-// CHECK-NOT: alloca [[S_FLOAT_TY]],
+// 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: alloca i{{[0-9]+}},
+// CHECK: alloca [2 x i{{[0-9]+}}],
+// CHECK: alloca [2 x [[S_FLOAT_TY]]],
+// CHECK: alloca [[S_FLOAT_TY]],
+// CHECK: alloca i{{[0-9]+}},
// CHECK: store i{{[0-9]+}}* [[GTID_ADDR]], i{{[0-9]+}}** [[GTID_ADDR_REF:%.+]]
// CHECK: [[GTID_REF:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[GTID_ADDR_REF]]
// CHECK: [[GTID:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[GTID_REF]]
-// CHECK: call i32 @__kmpc_single(
-
-// CHECK-DAG: getelementptr inbounds [2 x i32], [2 x i32]* %{{.+}}, i{{[0-9]+}} 0, i{{[0-9]+}} 0
-// CHECK-DAG: getelementptr inbounds [2 x [[S_FLOAT_TY]]], [2 x [[S_FLOAT_TY]]]* %{{.+}}, i{{[0-9]+}} 0, i{{[0-9]+}} 0
+// CHECK: call void @__kmpc_for_static_init_4(
// <Skip loop body>
+// CHECK: call void @__kmpc_for_static_fini(
-// CHECK-NOT: call void [[S_FLOAT_TY_DESTR]]([[S_FLOAT_TY]]* [[VAR_PRIV]])
-// CHECK-NOT: call void [[S_FLOAT_TY_DESTR]]([[S_FLOAT_TY]]*
-
-// CHECK: call void @__kmpc_end_single(
+// CHECK-DAG: call {{.*}} [[S_FLOAT_TY_DESTR]]([[S_FLOAT_TY]]*
+// CHECK-DAG: call {{.*}} [[S_FLOAT_TY_DESTR]]([[S_FLOAT_TY]]*
-// CHECK: call void @__kmpc_barrier(%{{.+}}* [[SINGLE_BARRIER_LOC]], i{{[0-9]+}} [[GTID]])
+// CHECK: call void @__kmpc_barrier(
// CHECK: ret void
//
OpenPOWER on IntegriCloud