diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-12-15 10:55:09 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-12-15 10:55:09 +0000 |
commit | 51df54207ea3a95a6f3e7a4fdd9603137bd698e4 (patch) | |
tree | 419abecade1358bd912b330c24043fb39b8613a4 /test/OpenMP/critical_codegen.cpp | |
parent | 68ac81b73374be1c4c6aa38d4435cf88e795e588 (diff) |
[OPENMP 4.5] Codegen for 'hint' clause of 'critical' directive
OpenMP 4.5 defines 'hint' clause for 'critical' directive. Patch adds codegen for this clause.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255639 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/critical_codegen.cpp')
-rw-r--r-- | test/OpenMP/critical_codegen.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/OpenMP/critical_codegen.cpp b/test/OpenMP/critical_codegen.cpp index 47099d6556..1f6e368eb7 100644 --- a/test/OpenMP/critical_codegen.cpp +++ b/test/OpenMP/critical_codegen.cpp @@ -10,6 +10,7 @@ // CHECK: [[IDENT_T_TY:%.+]] = type { i32, i32, i32, i32, i8* } // CHECK: [[UNNAMED_LOCK:@.+]] = common global [8 x i32] zeroinitializer // CHECK: [[THE_NAME_LOCK:@.+]] = common global [8 x i32] zeroinitializer +// CHECK: [[THE_NAME_LOCK1:@.+]] = common global [8 x i32] zeroinitializer // CHECK: define {{.*}}void [[FOO:@.+]]() @@ -32,6 +33,11 @@ int main() { // CHECK: call {{.*}}void @__kmpc_end_critical([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID]], [8 x i32]* [[THE_NAME_LOCK]]) #pragma omp critical(the_name) foo(); +// CHECK: call {{.*}}void @__kmpc_critical_with_hint([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID]], [8 x i32]* [[THE_NAME_LOCK1]], i64 23) +// CHECK-NEXT: invoke {{.*}}void [[FOO]]() +// CHECK: call {{.*}}void @__kmpc_end_critical([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID]], [8 x i32]* [[THE_NAME_LOCK1]]) +#pragma omp critical(the_name1) hint(23) + foo(); // CHECK-NOT: call void @__kmpc_critical // CHECK-NOT: call void @__kmpc_end_critical return a; |