[Openmp-commits] [openmp] a1f550e - [OpenMP] libomp: implement OpenMP 5.1 inoutset task dependence type
via Openmp-commits
openmp-commits at lists.llvm.org
Mon Jun 7 11:43:27 PDT 2021
Author: AndreyChurbanov
Date: 2021-06-07T21:42:51+03:00
New Revision: a1f550e052543f75acac9089b760cbc61729131f
URL: https://github.com/llvm/llvm-project/commit/a1f550e052543f75acac9089b760cbc61729131f
DIFF: https://github.com/llvm/llvm-project/commit/a1f550e052543f75acac9089b760cbc61729131f.diff
LOG: [OpenMP] libomp: implement OpenMP 5.1 inoutset task dependence type
Refactored code of dependence processing and added new inoutset dependence type.
Compiler can set dependence flag to 0x8 when call __kmpc_omp_task_with_deps.
Size of type of the dependence flag changed from 1 to 4 bytes in clang.
All dependence flags library gets so far and corresponding dependence types:
1 - IN, 2 - OUT, 3 - INOUT, 4 - MUTEXINOUTSET, 8 - INOUTSET.
Differential Revision: https://reviews.llvm.org/D97085
Added:
openmp/runtime/test/tasking/omp51_task_dep_inoutset.c
Modified:
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/test/OpenMP/depobj_codegen.cpp
clang/test/OpenMP/target_enter_data_depend_codegen.cpp
clang/test/OpenMP/target_exit_data_depend_codegen.cpp
clang/test/OpenMP/target_update_depend_codegen.cpp
clang/test/OpenMP/task_codegen.c
clang/test/OpenMP/task_codegen.cpp
clang/test/OpenMP/task_if_codegen.cpp
openmp/runtime/src/kmp.h
openmp/runtime/src/kmp_taskdeps.cpp
openmp/runtime/src/kmp_taskdeps.h
openmp/runtime/test/tasking/bug_nested_proxy_task.c
openmp/runtime/test/tasking/bug_proxy_task_dep_waiting.c
openmp/runtime/test/tasking/hidden_helper_task/common.h
openmp/runtime/test/tasking/hidden_helper_task/depend.cpp
openmp/runtime/test/tasking/hidden_helper_task/gtid.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index 068fd99b938f7..0614af98b208e 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -4609,7 +4609,7 @@ static RTLDependenceKindTy translateDependencyKind(OpenMPDependClauseKind K) {
/// Builds kmp_depend_info, if it is not built yet, and builds flags type.
static void getDependTypes(ASTContext &C, QualType &KmpDependInfoTy,
QualType &FlagsTy) {
- FlagsTy = C.getIntTypeForBitwidth(C.getTypeSize(C.BoolTy), /*Signed=*/false);
+ FlagsTy = C.getIntTypeForBitwidth(32, /*Signed=*/false);
if (KmpDependInfoTy.isNull()) {
RecordDecl *KmpDependInfoRD = C.buildImplicitRecord("kmp_depend_info");
KmpDependInfoRD->startDefinition();
diff --git a/clang/test/OpenMP/depobj_codegen.cpp b/clang/test/OpenMP/depobj_codegen.cpp
index 202538c31952a..b03febb507e72 100644
--- a/clang/test/OpenMP/depobj_codegen.cpp
+++ b/clang/test/OpenMP/depobj_codegen.cpp
@@ -52,14 +52,14 @@ int main(int argc, char **argv) {
// CHECK: [[SZ_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[BASE_ADDR]], i{{.+}} 0, i{{.+}} 1
// CHECK: store i64 4, i64* [[SZ_ADDR]],
// CHECK: [[FLAGS_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[BASE_ADDR]], i{{.+}} 0, i{{.+}} 2
-// CHECK: store i8 3, i8* [[FLAGS_ADDR]],
+// CHECK: store i32 3, i32* [[FLAGS_ADDR]],
// CHECK: [[BASE_ADDR:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP_ADDR]], i{{.+}} 2
// CHECK: [[ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[BASE_ADDR]], i{{.+}} 0, i{{.+}} 0
// CHECK: store i64 %{{.+}}, i64* [[ADDR]],
// CHECK: [[SZ_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[BASE_ADDR]], i{{.+}} 0, i{{.+}} 1
// CHECK: store i64 8, i64* [[SZ_ADDR]],
// CHECK: [[FLAGS_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[BASE_ADDR]], i{{.+}} 0, i{{.+}} 2
-// CHECK: store i8 3, i8* [[FLAGS_ADDR]],
+// CHECK: store i32 3, i32* [[FLAGS_ADDR]],
// CHECK: [[BASE_ADDR:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP_ADDR]], i{{.+}} 1
// CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[BASE_ADDR]] to i8*
// CHECK: store i8* [[DEP]], i8** [[MAIN_A]],
@@ -78,7 +78,7 @@ int main(int argc, char **argv) {
// CHECK: [[BODY]]:
// CHECK: [[EL:%.+]] = phi %struct.kmp_depend_info* [ [[B_BASE]], %{{.+}} ], [ [[EL_NEXT:%.+]], %[[BODY]] ]
// CHECK: [[FLAG_BASE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[EL]], i{{.+}} 0, i{{.+}} 2
-// CHECK: store i8 4, i8* [[FLAG_BASE]],
+// CHECK: store i32 4, i32* [[FLAG_BASE]],
// CHECK: [[EL_NEXT]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[EL]], i{{.+}} 1
// CHECK: [[IS_DONE:%.+]] = icmp eq %struct.kmp_depend_info* [[EL_NEXT]], [[END]]
// CHECK: br i1 [[IS_DONE]], label %[[DONE:.+]], label %[[BODY]]
@@ -173,7 +173,7 @@ int main(int argc, char **argv) {
// CHECK: store i64 1, i64* [[DEP_IC_SIZE]],
// dep[ITERATOR_COUNTER].flags = in_out;
// CHECK: [[DEP_IC_FLAGS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP_IC]], i{{.+}} 0, i{{.+}} 2
-// CHECK: store i8 3, i8* [[DEP_IC_FLAGS]],
+// CHECK: store i32 3, i32* [[DEP_IC_FLAGS]],
// ITERATOR_COUNTER = ITERATOR_COUNTER + 1;
// CHECK: [[ITERATOR_COUNTER:%.+]] = load i64, i64* [[ITERATOR_COUNTER_ADDR]],
@@ -206,7 +206,7 @@ int main(int argc, char **argv) {
// CHECK: [[SZ_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[BASE_ADDR]], i{{.+}} 0, i{{.+}} 1
// CHECK: store i64 8, i64* [[SZ_ADDR]],
// CHECK: [[FLAGS_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[BASE_ADDR]], i{{.+}} 0, i{{.+}} 2
-// CHECK: store i8 1, i8* [[FLAGS_ADDR]],
+// CHECK: store i32 1, i32* [[FLAGS_ADDR]],
// CHECK: [[SHAPE_ADDR:%.+]] = load i32*, i32** [[ARGV_ADDR:%.+]],
// CHECK: [[SZ1:%.+]] = mul nuw i64 12, %{{.+}}
// CHECK: [[SZ:%.+]] = mul nuw i64 [[SZ1]], 4
@@ -217,7 +217,7 @@ int main(int argc, char **argv) {
// CHECK: [[SZ_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[BASE_ADDR]], i{{.+}} 0, i{{.+}} 1
// CHECK: store i64 [[SZ]], i64* [[SZ_ADDR]],
// CHECK: [[FLAGS_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[BASE_ADDR]], i{{.+}} 0, i{{.+}} 2
-// CHECK: store i8 1, i8* [[FLAGS_ADDR]],
+// CHECK: store i32 1, i32* [[FLAGS_ADDR]],
// CHECK: [[BASE_ADDR:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP_ADDR]], i{{.+}} 1
// CHECK: [[DEP:%.+]] = bitcast %struct.kmp_depend_info* [[BASE_ADDR]] to i8*
// CHECK: store i8* [[DEP]], i8** [[TMAIN_A]],
@@ -236,7 +236,7 @@ int main(int argc, char **argv) {
// CHECK: [[BODY]]:
// CHECK: [[EL:%.+]] = phi %struct.kmp_depend_info* [ [[ARGC_BASE]], %{{.+}} ], [ [[EL_NEXT:%.+]], %[[BODY]] ]
// CHECK: [[FLAG_BASE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[EL]], i{{.+}} 0, i{{.+}} 2
-// CHECK: store i8 3, i8* [[FLAG_BASE]],
+// CHECK: store i32 3, i32* [[FLAG_BASE]],
// CHECK: [[EL_NEXT]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[EL]], i{{.+}} 1
// CHECK: [[IS_DONE:%.+]] = icmp eq %struct.kmp_depend_info* [[EL_NEXT]], [[END]]
// CHECK: br i1 [[IS_DONE]], label %[[DONE:.+]], label %[[BODY]]
diff --git a/clang/test/OpenMP/target_enter_data_depend_codegen.cpp b/clang/test/OpenMP/target_enter_data_depend_codegen.cpp
index 5f39a37c7d61e..c3f2d90ac3012 100644
--- a/clang/test/OpenMP/target_enter_data_depend_codegen.cpp
+++ b/clang/test/OpenMP/target_enter_data_depend_codegen.cpp
@@ -16,7 +16,7 @@
// expected-no-diagnostics
// CK1: [[ST:%.+]] = type { i32, double* }
// CK1: %struct.kmp_depend_info = type { i[[sz:64|32]],
-// CK1-SAME: i[[sz]], i8 }
+// CK1-SAME: i[[sz]], i32 }
#ifndef HEADER
#define HEADER
@@ -101,7 +101,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[MAIN_DEP]] to i8*
// CK1: = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]], i32 1, i8* [[BC]], i32 0, i8* null)
@@ -167,7 +167,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 1
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -175,14 +175,14 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 2
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: store i[[sz]] ptrtoint ([100 x double]* @gc to i[[sz]]), i[[sz]]* [[DEP_ADR]],
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[MAIN_DEP]] to i8*
// CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 3, i8* [[BC]], i32 0, i8* null)
// CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]])
@@ -248,7 +248,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] %{{.+}}, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 1
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -256,7 +256,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 2
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -264,14 +264,14 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 3
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: store i[[sz]] ptrtoint ([100 x double]* @gc to i[[sz]]), i[[sz]]* [[DEP_ADR]],
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[MAIN_DEP]] to i8*
// CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 4, i8* [[BC]], i32 0, i8* null)
// CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]])
@@ -331,7 +331,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] %{{.+}}, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 1
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -339,7 +339,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 2
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint float* %{{.+}} to i[[sz]]
@@ -347,14 +347,14 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] %{{.+}}, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 3
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: store i[[sz]] ptrtoint ([100 x double]* @gc to i[[sz]]), i[[sz]]* [[DEP_ADR]],
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 4
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -362,7 +362,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[MAIN_DEP]] to i8*
// CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 5, i8* [[BC]], i32 0, i8* null)
// CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]])
diff --git a/clang/test/OpenMP/target_exit_data_depend_codegen.cpp b/clang/test/OpenMP/target_exit_data_depend_codegen.cpp
index 5f2103db7d4e7..eb671cd323db6 100644
--- a/clang/test/OpenMP/target_exit_data_depend_codegen.cpp
+++ b/clang/test/OpenMP/target_exit_data_depend_codegen.cpp
@@ -16,7 +16,7 @@
// expected-no-diagnostics
// CK1: [[ST:%.+]] = type { i32, double* }
// CK1: %struct.kmp_depend_info = type { i[[sz:64|32]],
-// CK1-SAME: i[[sz]], i8 }
+// CK1-SAME: i[[sz]], i32 }
#ifndef HEADER
#define HEADER
@@ -101,7 +101,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[MAIN_DEP]] to i8*
// CK1: = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]], i32 1, i8* [[BC]], i32 0, i8* null)
@@ -167,7 +167,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 1
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -175,14 +175,14 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 2
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: store i[[sz]] ptrtoint ([100 x double]* @gc to i[[sz]]), i[[sz]]* [[DEP_ADR]],
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[MAIN_DEP]] to i8*
// CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 3, i8* [[BC]], i32 0, i8* null)
// CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]])
@@ -248,7 +248,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] %{{.+}}, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 1
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -256,7 +256,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 2
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -264,14 +264,14 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 3
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: store i[[sz]] ptrtoint ([100 x double]* @gc to i[[sz]]), i[[sz]]* [[DEP_ADR]],
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[MAIN_DEP]] to i8*
// CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 4, i8* [[BC]], i32 0, i8* null)
// CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]])
@@ -331,7 +331,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] %{{.+}}, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 1
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -339,7 +339,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 2
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint float* %{{.+}} to i[[sz]]
@@ -347,14 +347,14 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] %{{.+}}, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 3
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: store i[[sz]] ptrtoint ([100 x double]* @gc to i[[sz]]), i[[sz]]* [[DEP_ADR]],
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 4
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -362,7 +362,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[MAIN_DEP]] to i8*
// CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 5, i8* [[BC]], i32 0, i8* null)
// CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]])
diff --git a/clang/test/OpenMP/target_update_depend_codegen.cpp b/clang/test/OpenMP/target_update_depend_codegen.cpp
index f80536f4f28d3..d6a83847c42ed 100644
--- a/clang/test/OpenMP/target_update_depend_codegen.cpp
+++ b/clang/test/OpenMP/target_update_depend_codegen.cpp
@@ -16,7 +16,7 @@
// expected-no-diagnostics
// CK1: [[ST:%.+]] = type { i32, double* }
// CK1: %struct.kmp_depend_info = type { i[[sz:64|32]],
-// CK1-SAME: i[[sz]], i8 }
+// CK1-SAME: i[[sz]], i32 }
#ifndef HEADER
#define HEADER
@@ -101,7 +101,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[MAIN_DEP]] to i8*
// CK1: = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]], i32 1, i8* [[BC]], i32 0, i8* null)
@@ -167,7 +167,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 1
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -175,14 +175,14 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 2
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: store i[[sz]] ptrtoint ([100 x double]* @gc to i[[sz]]), i[[sz]]* [[DEP_ADR]],
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[MAIN_DEP]] to i8*
// CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 3, i8* [[BC]], i32 0, i8* null)
// CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]])
@@ -248,7 +248,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] %{{.+}}, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 1
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -256,7 +256,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 2
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -264,14 +264,14 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 3
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: store i[[sz]] ptrtoint ([100 x double]* @gc to i[[sz]]), i[[sz]]* [[DEP_ADR]],
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 3, i8* [[DEP_ATTRS]]
+ // CK1: store i32 3, i32* [[DEP_ATTRS]]
// CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[MAIN_DEP]] to i8*
// CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 4, i8* [[BC]], i32 0, i8* null)
// CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]])
@@ -331,7 +331,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] %{{.+}}, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 1
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -339,7 +339,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 2
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint float* %{{.+}} to i[[sz]]
@@ -347,14 +347,14 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] %{{.+}}, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 3
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: store i[[sz]] ptrtoint ([100 x double]* @gc to i[[sz]]), i[[sz]]* [[DEP_ADR]],
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 800, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[DEP:%.+]] = getelementptr %struct.kmp_depend_info, %struct.kmp_depend_info* [[MAIN_DEP]], i[[sz]] 4
// CK1: [[DEP_ADR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 0
// CK1: [[BC_ADR:%.+]] = ptrtoint i32* %{{.+}} to i[[sz]]
@@ -362,7 +362,7 @@ void foo(int arg) {
// CK1: [[DEP_SIZE:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 1
// CK1: store i[[sz]] 4, i[[sz]]* [[DEP_SIZE]],
// CK1: [[DEP_ATTRS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEP]], i32 0, i32 2
- // CK1: store i8 1, i8* [[DEP_ATTRS]]
+ // CK1: store i32 1, i32* [[DEP_ATTRS]]
// CK1: [[BC:%.+]] = bitcast %struct.kmp_depend_info* [[MAIN_DEP]] to i8*
// CK1: call void @__kmpc_omp_wait_deps(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i32 5, i8* [[BC]], i32 0, i8* null)
// CK1: call void @__kmpc_omp_task_begin_if0(%struct.ident_t* @{{.+}}, i32 %{{.+}}, i8* [[RES]])
diff --git a/clang/test/OpenMP/task_codegen.c b/clang/test/OpenMP/task_codegen.c
index f53fd75f67009..f8b92ab9034fb 100644
--- a/clang/test/OpenMP/task_codegen.c
+++ b/clang/test/OpenMP/task_codegen.c
@@ -68,7 +68,7 @@ int main() {
// CHECK: [[SIZE_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[VLA0]], i{{.+}} 0, i{{.+}} 1
// CHECK: store i64 4, i64* [[SIZE_ADDR]],
// CHECK: [[FLAGS_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[VLA0]], i{{.+}} 0, i{{.+}} 2
- // CHECK: store i8 1, i8* [[FLAGS_ADDR]],
+ // CHECK: store i32 1, i32* [[FLAGS_ADDR]],
// CHECK: [[A:%.+]] = load i32, i32* [[A_ADDR]],
// CHECK: [[A_CAST:%.+]] = sext i32 [[A]] to i64
// CHECK: [[SZ1:%.+]] = mul nuw i64 24, [[A_CAST]]
@@ -82,7 +82,7 @@ int main() {
// CHECK: [[SIZE_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[VLA1]], i{{.+}} 0, i{{.+}} 1
// CHECK: store i64 [[SZ]], i64* [[SIZE_ADDR]],
// CHECK: [[FLAGS_ADDR:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[VLA1]], i{{.+}} 0, i{{.+}} 2
- // CHECK: store i8 1, i8* [[FLAGS_ADDR]],
+ // CHECK: store i32 1, i32* [[FLAGS_ADDR]],
// CHECK: store i64 2, i64* [[DEP_COUNTER_ADDR]],
// CHECK: [[D:%.+]] = load i8*, i8** [[D_ADDR]],
// CHECK: [[BC:%.+]] = bitcast i8* [[D]] to %struct.kmp_depend_info*
@@ -210,7 +210,7 @@ for (int i = 0; i < 10; ++i)
// DEPS[DEP_COUNTER].flags = in;
// CHECK: [[DEPS_DC_FLAGS:%.+]] = getelementptr inbounds %struct.kmp_depend_info, %struct.kmp_depend_info* [[DEPS_DC]], i{{.+}} 0, i{{.+}} 2
- // CHECK: store i8 1, i8* [[DEPS_DC_FLAGS]],
+ // CHECK: store i32 1, i32* [[DEPS_DC_FLAGS]],
// DEP_COUNTER = DEP_COUNTER + 1;
// CHECK: [[DEP_COUNTER:%.+]] = load i64, i64* [[DEP_COUNTER_ADDR]],
diff --git a/clang/test/OpenMP/task_codegen.cpp b/clang/test/OpenMP/task_codegen.cpp
index de2e1a9d6900f..a96fbf932112a 100644
--- a/clang/test/OpenMP/task_codegen.cpp
+++ b/clang/test/OpenMP/task_codegen.cpp
@@ -231,7 +231,7 @@ void xxxx() {
// CHECK1-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP25]], i32 0, i32 1
// CHECK1-NEXT: store i64 4, i64* [[TMP27]], align 8
// CHECK1-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP25]], i32 0, i32 2
-// CHECK1-NEXT: store i8 1, i8* [[TMP28]], align 8
+// CHECK1-NEXT: store i32 1, i32* [[TMP28]], align 8
// CHECK1-NEXT: [[TMP29:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP24]], i64 1
// CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP29]], i32 0, i32 0
// CHECK1-NEXT: [[TMP31:%.*]] = ptrtoint i8* [[B]] to i64
@@ -239,7 +239,7 @@ void xxxx() {
// CHECK1-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP29]], i32 0, i32 1
// CHECK1-NEXT: store i64 1, i64* [[TMP32]], align 8
// CHECK1-NEXT: [[TMP33:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP29]], i32 0, i32 2
-// CHECK1-NEXT: store i8 1, i8* [[TMP33]], align 8
+// CHECK1-NEXT: store i32 1, i32* [[TMP33]], align 8
// CHECK1-NEXT: [[TMP34:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP24]], i64 2
// CHECK1-NEXT: [[TMP35:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP34]], i32 0, i32 0
// CHECK1-NEXT: [[TMP36:%.*]] = ptrtoint [2 x %struct.S]* [[S]] to i64
@@ -247,7 +247,7 @@ void xxxx() {
// CHECK1-NEXT: [[TMP37:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP34]], i32 0, i32 1
// CHECK1-NEXT: store i64 8, i64* [[TMP37]], align 8
// CHECK1-NEXT: [[TMP38:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP34]], i32 0, i32 2
-// CHECK1-NEXT: store i8 1, i8* [[TMP38]], align 8
+// CHECK1-NEXT: store i32 1, i32* [[TMP38]], align 8
// CHECK1-NEXT: [[TMP39:%.*]] = mul nsw i64 0, [[TMP2]]
// CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[VLA]], i64 [[TMP39]]
// CHECK1-NEXT: [[TMP40:%.*]] = mul nsw i64 9, [[TMP2]]
@@ -263,7 +263,7 @@ void xxxx() {
// CHECK1-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP45]], i32 0, i32 1
// CHECK1-NEXT: store i64 [[TMP44]], i64* [[TMP48]], align 8
// CHECK1-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP45]], i32 0, i32 2
-// CHECK1-NEXT: store i8 1, i8* [[TMP49]], align 8
+// CHECK1-NEXT: store i32 1, i32* [[TMP49]], align 8
// CHECK1-NEXT: store i64 4, i64* [[DEP_COUNTER_ADDR]], align 8
// CHECK1-NEXT: [[TMP50:%.*]] = bitcast %struct.kmp_depend_info* [[TMP24]] to i8*
// CHECK1-NEXT: [[TMP51:%.*]] = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]], i8* [[TMP18]], i32 4, i8* [[TMP50]], i32 0, i8* null)
@@ -285,7 +285,7 @@ void xxxx() {
// CHECK1-NEXT: [[TMP64:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP61]], i32 0, i32 1
// CHECK1-NEXT: store i64 4, i64* [[TMP64]], align 8
// CHECK1-NEXT: [[TMP65:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP61]], i32 0, i32 2
-// CHECK1-NEXT: store i8 3, i8* [[TMP65]], align 8
+// CHECK1-NEXT: store i32 3, i32* [[TMP65]], align 8
// CHECK1-NEXT: [[TMP66:%.*]] = load i8, i8* [[B]], align 1
// CHECK1-NEXT: [[TMP67:%.*]] = sext i8 [[TMP66]] to i64
// CHECK1-NEXT: [[TMP68:%.*]] = mul nsw i64 4, [[TMP2]]
@@ -307,7 +307,7 @@ void xxxx() {
// CHECK1-NEXT: [[TMP79:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP76]], i32 0, i32 1
// CHECK1-NEXT: store i64 [[TMP75]], i64* [[TMP79]], align 8
// CHECK1-NEXT: [[TMP80:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP76]], i32 0, i32 2
-// CHECK1-NEXT: store i8 3, i8* [[TMP80]], align 8
+// CHECK1-NEXT: store i32 3, i32* [[TMP80]], align 8
// CHECK1-NEXT: store i64 2, i64* [[DEP_COUNTER_ADDR11]], align 8
// CHECK1-NEXT: [[TMP81:%.*]] = bitcast %struct.kmp_depend_info* [[TMP60]] to i8*
// CHECK1-NEXT: [[TMP82:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP59]], i32 0, i32 2
@@ -325,7 +325,7 @@ void xxxx() {
// CHECK1-NEXT: [[TMP91:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP88]], i32 0, i32 1
// CHECK1-NEXT: store i64 4, i64* [[TMP91]], align 8
// CHECK1-NEXT: [[TMP92:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP88]], i32 0, i32 2
-// CHECK1-NEXT: store i8 4, i8* [[TMP92]], align 8
+// CHECK1-NEXT: store i32 4, i32* [[TMP92]], align 8
// CHECK1-NEXT: [[TMP93:%.*]] = load i8, i8* [[B]], align 1
// CHECK1-NEXT: [[TMP94:%.*]] = sext i8 [[TMP93]] to i64
// CHECK1-NEXT: [[TMP95:%.*]] = mul nsw i64 4, [[TMP2]]
@@ -347,7 +347,7 @@ void xxxx() {
// CHECK1-NEXT: [[TMP106:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP103]], i32 0, i32 1
// CHECK1-NEXT: store i64 [[TMP102]], i64* [[TMP106]], align 8
// CHECK1-NEXT: [[TMP107:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP103]], i32 0, i32 2
-// CHECK1-NEXT: store i8 4, i8* [[TMP107]], align 8
+// CHECK1-NEXT: store i32 4, i32* [[TMP107]], align 8
// CHECK1-NEXT: store i64 2, i64* [[DEP_COUNTER_ADDR19]], align 8
// CHECK1-NEXT: [[TMP108:%.*]] = bitcast %struct.kmp_depend_info* [[TMP87]] to i8*
// CHECK1-NEXT: [[TMP109:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP86]], i32 0, i32 2
@@ -363,7 +363,7 @@ void xxxx() {
// CHECK1-NEXT: [[TMP117:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP115]], i32 0, i32 1
// CHECK1-NEXT: store i64 4, i64* [[TMP117]], align 8
// CHECK1-NEXT: [[TMP118:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP115]], i32 0, i32 2
-// CHECK1-NEXT: store i8 3, i8* [[TMP118]], align 8
+// CHECK1-NEXT: store i32 3, i32* [[TMP118]], align 8
// CHECK1-NEXT: [[ARRAYIDX22:%.*]] = getelementptr inbounds [2 x %struct.S], [2 x %struct.S]* [[S]], i64 0, i64 1
// CHECK1-NEXT: [[TMP119:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP114]], i64 1
// CHECK1-NEXT: [[TMP120:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP119]], i32 0, i32 0
@@ -372,7 +372,7 @@ void xxxx() {
// CHECK1-NEXT: [[TMP122:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP119]], i32 0, i32 1
// CHECK1-NEXT: store i64 4, i64* [[TMP122]], align 8
// CHECK1-NEXT: [[TMP123:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP119]], i32 0, i32 2
-// CHECK1-NEXT: store i8 3, i8* [[TMP123]], align 8
+// CHECK1-NEXT: store i32 3, i32* [[TMP123]], align 8
// CHECK1-NEXT: [[TMP124:%.*]] = mul nsw i64 0, [[TMP2]]
// CHECK1-NEXT: [[ARRAYIDX23:%.*]] = getelementptr inbounds i32, i32* [[VLA]], i64 [[TMP124]]
// CHECK1-NEXT: [[ARRAYIDX24:%.*]] = getelementptr inbounds i32, i32* [[ARRAYIDX23]], i64 3
@@ -396,7 +396,7 @@ void xxxx() {
// CHECK1-NEXT: [[TMP137:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP134]], i32 0, i32 1
// CHECK1-NEXT: store i64 [[TMP133]], i64* [[TMP137]], align 8
// CHECK1-NEXT: [[TMP138:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP134]], i32 0, i32 2
-// CHECK1-NEXT: store i8 3, i8* [[TMP138]], align 8
+// CHECK1-NEXT: store i32 3, i32* [[TMP138]], align 8
// CHECK1-NEXT: store i64 3, i64* [[DEP_COUNTER_ADDR27]], align 8
// CHECK1-NEXT: [[TMP139:%.*]] = bitcast %struct.kmp_depend_info* [[TMP114]] to i8*
// CHECK1-NEXT: [[TMP140:%.*]] = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]], i8* [[TMP111]], i32 3, i8* [[TMP139]], i32 0, i8* null)
@@ -1423,7 +1423,7 @@ void xxxx() {
// CHECK2-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP25]], i32 0, i32 1
// CHECK2-NEXT: store i64 4, i64* [[TMP27]], align 8
// CHECK2-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP25]], i32 0, i32 2
-// CHECK2-NEXT: store i8 1, i8* [[TMP28]], align 8
+// CHECK2-NEXT: store i32 1, i32* [[TMP28]], align 8
// CHECK2-NEXT: [[TMP29:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP24]], i64 1
// CHECK2-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP29]], i32 0, i32 0
// CHECK2-NEXT: [[TMP31:%.*]] = ptrtoint i8* [[B]] to i64
@@ -1431,7 +1431,7 @@ void xxxx() {
// CHECK2-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP29]], i32 0, i32 1
// CHECK2-NEXT: store i64 1, i64* [[TMP32]], align 8
// CHECK2-NEXT: [[TMP33:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP29]], i32 0, i32 2
-// CHECK2-NEXT: store i8 1, i8* [[TMP33]], align 8
+// CHECK2-NEXT: store i32 1, i32* [[TMP33]], align 8
// CHECK2-NEXT: [[TMP34:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP24]], i64 2
// CHECK2-NEXT: [[TMP35:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP34]], i32 0, i32 0
// CHECK2-NEXT: [[TMP36:%.*]] = ptrtoint [2 x %struct.S]* [[S]] to i64
@@ -1439,7 +1439,7 @@ void xxxx() {
// CHECK2-NEXT: [[TMP37:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP34]], i32 0, i32 1
// CHECK2-NEXT: store i64 8, i64* [[TMP37]], align 8
// CHECK2-NEXT: [[TMP38:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP34]], i32 0, i32 2
-// CHECK2-NEXT: store i8 1, i8* [[TMP38]], align 8
+// CHECK2-NEXT: store i32 1, i32* [[TMP38]], align 8
// CHECK2-NEXT: [[TMP39:%.*]] = mul nsw i64 0, [[TMP2]]
// CHECK2-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[VLA]], i64 [[TMP39]]
// CHECK2-NEXT: [[TMP40:%.*]] = mul nsw i64 9, [[TMP2]]
@@ -1455,7 +1455,7 @@ void xxxx() {
// CHECK2-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP45]], i32 0, i32 1
// CHECK2-NEXT: store i64 [[TMP44]], i64* [[TMP48]], align 8
// CHECK2-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP45]], i32 0, i32 2
-// CHECK2-NEXT: store i8 1, i8* [[TMP49]], align 8
+// CHECK2-NEXT: store i32 1, i32* [[TMP49]], align 8
// CHECK2-NEXT: store i64 4, i64* [[DEP_COUNTER_ADDR]], align 8
// CHECK2-NEXT: [[TMP50:%.*]] = bitcast %struct.kmp_depend_info* [[TMP24]] to i8*
// CHECK2-NEXT: [[TMP51:%.*]] = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]], i8* [[TMP18]], i32 4, i8* [[TMP50]], i32 0, i8* null)
@@ -1477,7 +1477,7 @@ void xxxx() {
// CHECK2-NEXT: [[TMP64:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP61]], i32 0, i32 1
// CHECK2-NEXT: store i64 4, i64* [[TMP64]], align 8
// CHECK2-NEXT: [[TMP65:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP61]], i32 0, i32 2
-// CHECK2-NEXT: store i8 3, i8* [[TMP65]], align 8
+// CHECK2-NEXT: store i32 3, i32* [[TMP65]], align 8
// CHECK2-NEXT: [[TMP66:%.*]] = load i8, i8* [[B]], align 1
// CHECK2-NEXT: [[TMP67:%.*]] = sext i8 [[TMP66]] to i64
// CHECK2-NEXT: [[TMP68:%.*]] = mul nsw i64 4, [[TMP2]]
@@ -1499,7 +1499,7 @@ void xxxx() {
// CHECK2-NEXT: [[TMP79:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP76]], i32 0, i32 1
// CHECK2-NEXT: store i64 [[TMP75]], i64* [[TMP79]], align 8
// CHECK2-NEXT: [[TMP80:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP76]], i32 0, i32 2
-// CHECK2-NEXT: store i8 3, i8* [[TMP80]], align 8
+// CHECK2-NEXT: store i32 3, i32* [[TMP80]], align 8
// CHECK2-NEXT: store i64 2, i64* [[DEP_COUNTER_ADDR11]], align 8
// CHECK2-NEXT: [[TMP81:%.*]] = bitcast %struct.kmp_depend_info* [[TMP60]] to i8*
// CHECK2-NEXT: [[TMP82:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP59]], i32 0, i32 2
@@ -1517,7 +1517,7 @@ void xxxx() {
// CHECK2-NEXT: [[TMP91:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP88]], i32 0, i32 1
// CHECK2-NEXT: store i64 4, i64* [[TMP91]], align 8
// CHECK2-NEXT: [[TMP92:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP88]], i32 0, i32 2
-// CHECK2-NEXT: store i8 4, i8* [[TMP92]], align 8
+// CHECK2-NEXT: store i32 4, i32* [[TMP92]], align 8
// CHECK2-NEXT: [[TMP93:%.*]] = load i8, i8* [[B]], align 1
// CHECK2-NEXT: [[TMP94:%.*]] = sext i8 [[TMP93]] to i64
// CHECK2-NEXT: [[TMP95:%.*]] = mul nsw i64 4, [[TMP2]]
@@ -1539,7 +1539,7 @@ void xxxx() {
// CHECK2-NEXT: [[TMP106:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP103]], i32 0, i32 1
// CHECK2-NEXT: store i64 [[TMP102]], i64* [[TMP106]], align 8
// CHECK2-NEXT: [[TMP107:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP103]], i32 0, i32 2
-// CHECK2-NEXT: store i8 4, i8* [[TMP107]], align 8
+// CHECK2-NEXT: store i32 4, i32* [[TMP107]], align 8
// CHECK2-NEXT: store i64 2, i64* [[DEP_COUNTER_ADDR19]], align 8
// CHECK2-NEXT: [[TMP108:%.*]] = bitcast %struct.kmp_depend_info* [[TMP87]] to i8*
// CHECK2-NEXT: [[TMP109:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP86]], i32 0, i32 2
@@ -1555,7 +1555,7 @@ void xxxx() {
// CHECK2-NEXT: [[TMP117:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP115]], i32 0, i32 1
// CHECK2-NEXT: store i64 4, i64* [[TMP117]], align 8
// CHECK2-NEXT: [[TMP118:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP115]], i32 0, i32 2
-// CHECK2-NEXT: store i8 3, i8* [[TMP118]], align 8
+// CHECK2-NEXT: store i32 3, i32* [[TMP118]], align 8
// CHECK2-NEXT: [[ARRAYIDX22:%.*]] = getelementptr inbounds [2 x %struct.S], [2 x %struct.S]* [[S]], i64 0, i64 1
// CHECK2-NEXT: [[TMP119:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP114]], i64 1
// CHECK2-NEXT: [[TMP120:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP119]], i32 0, i32 0
@@ -1564,7 +1564,7 @@ void xxxx() {
// CHECK2-NEXT: [[TMP122:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP119]], i32 0, i32 1
// CHECK2-NEXT: store i64 4, i64* [[TMP122]], align 8
// CHECK2-NEXT: [[TMP123:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP119]], i32 0, i32 2
-// CHECK2-NEXT: store i8 3, i8* [[TMP123]], align 8
+// CHECK2-NEXT: store i32 3, i32* [[TMP123]], align 8
// CHECK2-NEXT: [[TMP124:%.*]] = mul nsw i64 0, [[TMP2]]
// CHECK2-NEXT: [[ARRAYIDX23:%.*]] = getelementptr inbounds i32, i32* [[VLA]], i64 [[TMP124]]
// CHECK2-NEXT: [[ARRAYIDX24:%.*]] = getelementptr inbounds i32, i32* [[ARRAYIDX23]], i64 3
@@ -1588,7 +1588,7 @@ void xxxx() {
// CHECK2-NEXT: [[TMP137:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP134]], i32 0, i32 1
// CHECK2-NEXT: store i64 [[TMP133]], i64* [[TMP137]], align 8
// CHECK2-NEXT: [[TMP138:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP134]], i32 0, i32 2
-// CHECK2-NEXT: store i8 3, i8* [[TMP138]], align 8
+// CHECK2-NEXT: store i32 3, i32* [[TMP138]], align 8
// CHECK2-NEXT: store i64 3, i64* [[DEP_COUNTER_ADDR27]], align 8
// CHECK2-NEXT: [[TMP139:%.*]] = bitcast %struct.kmp_depend_info* [[TMP114]] to i8*
// CHECK2-NEXT: [[TMP140:%.*]] = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]], i8* [[TMP111]], i32 3, i8* [[TMP139]], i32 0, i8* null)
@@ -2617,7 +2617,7 @@ void xxxx() {
// CHECK3-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP24]], i32 0, i32 1
// CHECK3-NEXT: store i64 4, i64* [[TMP26]], align 8
// CHECK3-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP24]], i32 0, i32 2
-// CHECK3-NEXT: store i8 1, i8* [[TMP27]], align 8
+// CHECK3-NEXT: store i32 1, i32* [[TMP27]], align 8
// CHECK3-NEXT: [[TMP28:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP23]], i64 1
// CHECK3-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP28]], i32 0, i32 0
// CHECK3-NEXT: [[TMP30:%.*]] = ptrtoint i8* [[B]] to i64
@@ -2625,7 +2625,7 @@ void xxxx() {
// CHECK3-NEXT: [[TMP31:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP28]], i32 0, i32 1
// CHECK3-NEXT: store i64 1, i64* [[TMP31]], align 8
// CHECK3-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP28]], i32 0, i32 2
-// CHECK3-NEXT: store i8 1, i8* [[TMP32]], align 8
+// CHECK3-NEXT: store i32 1, i32* [[TMP32]], align 8
// CHECK3-NEXT: [[TMP33:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP23]], i64 2
// CHECK3-NEXT: [[TMP34:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP33]], i32 0, i32 0
// CHECK3-NEXT: [[TMP35:%.*]] = ptrtoint [2 x %struct.S]* [[S]] to i64
@@ -2633,7 +2633,7 @@ void xxxx() {
// CHECK3-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP33]], i32 0, i32 1
// CHECK3-NEXT: store i64 8, i64* [[TMP36]], align 8
// CHECK3-NEXT: [[TMP37:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP33]], i32 0, i32 2
-// CHECK3-NEXT: store i8 1, i8* [[TMP37]], align 8
+// CHECK3-NEXT: store i32 1, i32* [[TMP37]], align 8
// CHECK3-NEXT: [[TMP38:%.*]] = mul nsw i64 0, [[TMP1]]
// CHECK3-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[VLA]], i64 [[TMP38]]
// CHECK3-NEXT: [[TMP39:%.*]] = mul nsw i64 9, [[TMP1]]
@@ -2649,7 +2649,7 @@ void xxxx() {
// CHECK3-NEXT: [[TMP47:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP44]], i32 0, i32 1
// CHECK3-NEXT: store i64 [[TMP43]], i64* [[TMP47]], align 8
// CHECK3-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP44]], i32 0, i32 2
-// CHECK3-NEXT: store i8 1, i8* [[TMP48]], align 8
+// CHECK3-NEXT: store i32 1, i32* [[TMP48]], align 8
// CHECK3-NEXT: store i64 4, i64* [[DEP_COUNTER_ADDR]], align 8
// CHECK3-NEXT: [[TMP49:%.*]] = bitcast %struct.kmp_depend_info* [[TMP23]] to i8*
// CHECK3-NEXT: [[OMP_GLOBAL_THREAD_NUM5:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB5]])
@@ -2675,7 +2675,7 @@ void xxxx() {
// CHECK3-NEXT: [[TMP63:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP60]], i32 0, i32 1
// CHECK3-NEXT: store i64 4, i64* [[TMP63]], align 8
// CHECK3-NEXT: [[TMP64:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP60]], i32 0, i32 2
-// CHECK3-NEXT: store i8 3, i8* [[TMP64]], align 8
+// CHECK3-NEXT: store i32 3, i32* [[TMP64]], align 8
// CHECK3-NEXT: [[TMP65:%.*]] = load i8, i8* [[B]], align 1
// CHECK3-NEXT: [[TMP66:%.*]] = sext i8 [[TMP65]] to i64
// CHECK3-NEXT: [[TMP67:%.*]] = mul nsw i64 4, [[TMP1]]
@@ -2697,7 +2697,7 @@ void xxxx() {
// CHECK3-NEXT: [[TMP78:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP75]], i32 0, i32 1
// CHECK3-NEXT: store i64 [[TMP74]], i64* [[TMP78]], align 8
// CHECK3-NEXT: [[TMP79:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP75]], i32 0, i32 2
-// CHECK3-NEXT: store i8 3, i8* [[TMP79]], align 8
+// CHECK3-NEXT: store i32 3, i32* [[TMP79]], align 8
// CHECK3-NEXT: store i64 2, i64* [[DEP_COUNTER_ADDR17]], align 8
// CHECK3-NEXT: [[TMP80:%.*]] = bitcast %struct.kmp_depend_info* [[TMP59]] to i8*
// CHECK3-NEXT: [[OMP_GLOBAL_THREAD_NUM18:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB9]])
@@ -2717,7 +2717,7 @@ void xxxx() {
// CHECK3-NEXT: [[TMP90:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP87]], i32 0, i32 1
// CHECK3-NEXT: store i64 4, i64* [[TMP90]], align 8
// CHECK3-NEXT: [[TMP91:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP87]], i32 0, i32 2
-// CHECK3-NEXT: store i8 4, i8* [[TMP91]], align 8
+// CHECK3-NEXT: store i32 4, i32* [[TMP91]], align 8
// CHECK3-NEXT: [[TMP92:%.*]] = load i8, i8* [[B]], align 1
// CHECK3-NEXT: [[TMP93:%.*]] = sext i8 [[TMP92]] to i64
// CHECK3-NEXT: [[TMP94:%.*]] = mul nsw i64 4, [[TMP1]]
@@ -2739,7 +2739,7 @@ void xxxx() {
// CHECK3-NEXT: [[TMP105:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP102]], i32 0, i32 1
// CHECK3-NEXT: store i64 [[TMP101]], i64* [[TMP105]], align 8
// CHECK3-NEXT: [[TMP106:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP102]], i32 0, i32 2
-// CHECK3-NEXT: store i8 4, i8* [[TMP106]], align 8
+// CHECK3-NEXT: store i32 4, i32* [[TMP106]], align 8
// CHECK3-NEXT: store i64 2, i64* [[DEP_COUNTER_ADDR27]], align 8
// CHECK3-NEXT: [[TMP107:%.*]] = bitcast %struct.kmp_depend_info* [[TMP86]] to i8*
// CHECK3-NEXT: [[OMP_GLOBAL_THREAD_NUM28:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB11]])
@@ -2757,7 +2757,7 @@ void xxxx() {
// CHECK3-NEXT: [[TMP116:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP114]], i32 0, i32 1
// CHECK3-NEXT: store i64 4, i64* [[TMP116]], align 8
// CHECK3-NEXT: [[TMP117:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP114]], i32 0, i32 2
-// CHECK3-NEXT: store i8 3, i8* [[TMP117]], align 8
+// CHECK3-NEXT: store i32 3, i32* [[TMP117]], align 8
// CHECK3-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds [2 x %struct.S], [2 x %struct.S]* [[S]], i64 0, i64 1
// CHECK3-NEXT: [[TMP118:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP113]], i64 1
// CHECK3-NEXT: [[TMP119:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP118]], i32 0, i32 0
@@ -2766,7 +2766,7 @@ void xxxx() {
// CHECK3-NEXT: [[TMP121:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP118]], i32 0, i32 1
// CHECK3-NEXT: store i64 4, i64* [[TMP121]], align 8
// CHECK3-NEXT: [[TMP122:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP118]], i32 0, i32 2
-// CHECK3-NEXT: store i8 3, i8* [[TMP122]], align 8
+// CHECK3-NEXT: store i32 3, i32* [[TMP122]], align 8
// CHECK3-NEXT: [[TMP123:%.*]] = mul nsw i64 0, [[TMP1]]
// CHECK3-NEXT: [[ARRAYIDX33:%.*]] = getelementptr inbounds i32, i32* [[VLA]], i64 [[TMP123]]
// CHECK3-NEXT: [[ARRAYIDX34:%.*]] = getelementptr inbounds i32, i32* [[ARRAYIDX33]], i64 3
@@ -2790,7 +2790,7 @@ void xxxx() {
// CHECK3-NEXT: [[TMP136:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP133]], i32 0, i32 1
// CHECK3-NEXT: store i64 [[TMP132]], i64* [[TMP136]], align 8
// CHECK3-NEXT: [[TMP137:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP133]], i32 0, i32 2
-// CHECK3-NEXT: store i8 3, i8* [[TMP137]], align 8
+// CHECK3-NEXT: store i32 3, i32* [[TMP137]], align 8
// CHECK3-NEXT: store i64 3, i64* [[DEP_COUNTER_ADDR37]], align 8
// CHECK3-NEXT: [[TMP138:%.*]] = bitcast %struct.kmp_depend_info* [[TMP113]] to i8*
// CHECK3-NEXT: [[OMP_GLOBAL_THREAD_NUM38:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB13]])
@@ -3696,7 +3696,7 @@ void xxxx() {
// CHECK4-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP24]], i32 0, i32 1
// CHECK4-NEXT: store i64 4, i64* [[TMP26]], align 8
// CHECK4-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP24]], i32 0, i32 2
-// CHECK4-NEXT: store i8 1, i8* [[TMP27]], align 8
+// CHECK4-NEXT: store i32 1, i32* [[TMP27]], align 8
// CHECK4-NEXT: [[TMP28:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP23]], i64 1
// CHECK4-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP28]], i32 0, i32 0
// CHECK4-NEXT: [[TMP30:%.*]] = ptrtoint i8* [[B]] to i64
@@ -3704,7 +3704,7 @@ void xxxx() {
// CHECK4-NEXT: [[TMP31:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP28]], i32 0, i32 1
// CHECK4-NEXT: store i64 1, i64* [[TMP31]], align 8
// CHECK4-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP28]], i32 0, i32 2
-// CHECK4-NEXT: store i8 1, i8* [[TMP32]], align 8
+// CHECK4-NEXT: store i32 1, i32* [[TMP32]], align 8
// CHECK4-NEXT: [[TMP33:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP23]], i64 2
// CHECK4-NEXT: [[TMP34:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP33]], i32 0, i32 0
// CHECK4-NEXT: [[TMP35:%.*]] = ptrtoint [2 x %struct.S]* [[S]] to i64
@@ -3712,7 +3712,7 @@ void xxxx() {
// CHECK4-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP33]], i32 0, i32 1
// CHECK4-NEXT: store i64 8, i64* [[TMP36]], align 8
// CHECK4-NEXT: [[TMP37:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP33]], i32 0, i32 2
-// CHECK4-NEXT: store i8 1, i8* [[TMP37]], align 8
+// CHECK4-NEXT: store i32 1, i32* [[TMP37]], align 8
// CHECK4-NEXT: [[TMP38:%.*]] = mul nsw i64 0, [[TMP1]]
// CHECK4-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[VLA]], i64 [[TMP38]]
// CHECK4-NEXT: [[TMP39:%.*]] = mul nsw i64 9, [[TMP1]]
@@ -3728,7 +3728,7 @@ void xxxx() {
// CHECK4-NEXT: [[TMP47:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP44]], i32 0, i32 1
// CHECK4-NEXT: store i64 [[TMP43]], i64* [[TMP47]], align 8
// CHECK4-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP44]], i32 0, i32 2
-// CHECK4-NEXT: store i8 1, i8* [[TMP48]], align 8
+// CHECK4-NEXT: store i32 1, i32* [[TMP48]], align 8
// CHECK4-NEXT: store i64 4, i64* [[DEP_COUNTER_ADDR]], align 8
// CHECK4-NEXT: [[TMP49:%.*]] = bitcast %struct.kmp_depend_info* [[TMP23]] to i8*
// CHECK4-NEXT: [[OMP_GLOBAL_THREAD_NUM5:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB5]])
@@ -3754,7 +3754,7 @@ void xxxx() {
// CHECK4-NEXT: [[TMP63:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP60]], i32 0, i32 1
// CHECK4-NEXT: store i64 4, i64* [[TMP63]], align 8
// CHECK4-NEXT: [[TMP64:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP60]], i32 0, i32 2
-// CHECK4-NEXT: store i8 3, i8* [[TMP64]], align 8
+// CHECK4-NEXT: store i32 3, i32* [[TMP64]], align 8
// CHECK4-NEXT: [[TMP65:%.*]] = load i8, i8* [[B]], align 1
// CHECK4-NEXT: [[TMP66:%.*]] = sext i8 [[TMP65]] to i64
// CHECK4-NEXT: [[TMP67:%.*]] = mul nsw i64 4, [[TMP1]]
@@ -3776,7 +3776,7 @@ void xxxx() {
// CHECK4-NEXT: [[TMP78:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP75]], i32 0, i32 1
// CHECK4-NEXT: store i64 [[TMP74]], i64* [[TMP78]], align 8
// CHECK4-NEXT: [[TMP79:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP75]], i32 0, i32 2
-// CHECK4-NEXT: store i8 3, i8* [[TMP79]], align 8
+// CHECK4-NEXT: store i32 3, i32* [[TMP79]], align 8
// CHECK4-NEXT: store i64 2, i64* [[DEP_COUNTER_ADDR17]], align 8
// CHECK4-NEXT: [[TMP80:%.*]] = bitcast %struct.kmp_depend_info* [[TMP59]] to i8*
// CHECK4-NEXT: [[OMP_GLOBAL_THREAD_NUM18:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB9]])
@@ -3796,7 +3796,7 @@ void xxxx() {
// CHECK4-NEXT: [[TMP90:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP87]], i32 0, i32 1
// CHECK4-NEXT: store i64 4, i64* [[TMP90]], align 8
// CHECK4-NEXT: [[TMP91:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP87]], i32 0, i32 2
-// CHECK4-NEXT: store i8 4, i8* [[TMP91]], align 8
+// CHECK4-NEXT: store i32 4, i32* [[TMP91]], align 8
// CHECK4-NEXT: [[TMP92:%.*]] = load i8, i8* [[B]], align 1
// CHECK4-NEXT: [[TMP93:%.*]] = sext i8 [[TMP92]] to i64
// CHECK4-NEXT: [[TMP94:%.*]] = mul nsw i64 4, [[TMP1]]
@@ -3818,7 +3818,7 @@ void xxxx() {
// CHECK4-NEXT: [[TMP105:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP102]], i32 0, i32 1
// CHECK4-NEXT: store i64 [[TMP101]], i64* [[TMP105]], align 8
// CHECK4-NEXT: [[TMP106:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP102]], i32 0, i32 2
-// CHECK4-NEXT: store i8 4, i8* [[TMP106]], align 8
+// CHECK4-NEXT: store i32 4, i32* [[TMP106]], align 8
// CHECK4-NEXT: store i64 2, i64* [[DEP_COUNTER_ADDR27]], align 8
// CHECK4-NEXT: [[TMP107:%.*]] = bitcast %struct.kmp_depend_info* [[TMP86]] to i8*
// CHECK4-NEXT: [[OMP_GLOBAL_THREAD_NUM28:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB11]])
@@ -3836,7 +3836,7 @@ void xxxx() {
// CHECK4-NEXT: [[TMP116:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP114]], i32 0, i32 1
// CHECK4-NEXT: store i64 4, i64* [[TMP116]], align 8
// CHECK4-NEXT: [[TMP117:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP114]], i32 0, i32 2
-// CHECK4-NEXT: store i8 3, i8* [[TMP117]], align 8
+// CHECK4-NEXT: store i32 3, i32* [[TMP117]], align 8
// CHECK4-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds [2 x %struct.S], [2 x %struct.S]* [[S]], i64 0, i64 1
// CHECK4-NEXT: [[TMP118:%.*]] = getelementptr [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP113]], i64 1
// CHECK4-NEXT: [[TMP119:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP118]], i32 0, i32 0
@@ -3845,7 +3845,7 @@ void xxxx() {
// CHECK4-NEXT: [[TMP121:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP118]], i32 0, i32 1
// CHECK4-NEXT: store i64 4, i64* [[TMP121]], align 8
// CHECK4-NEXT: [[TMP122:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP118]], i32 0, i32 2
-// CHECK4-NEXT: store i8 3, i8* [[TMP122]], align 8
+// CHECK4-NEXT: store i32 3, i32* [[TMP122]], align 8
// CHECK4-NEXT: [[TMP123:%.*]] = mul nsw i64 0, [[TMP1]]
// CHECK4-NEXT: [[ARRAYIDX33:%.*]] = getelementptr inbounds i32, i32* [[VLA]], i64 [[TMP123]]
// CHECK4-NEXT: [[ARRAYIDX34:%.*]] = getelementptr inbounds i32, i32* [[ARRAYIDX33]], i64 3
@@ -3869,7 +3869,7 @@ void xxxx() {
// CHECK4-NEXT: [[TMP136:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP133]], i32 0, i32 1
// CHECK4-NEXT: store i64 [[TMP132]], i64* [[TMP136]], align 8
// CHECK4-NEXT: [[TMP137:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP133]], i32 0, i32 2
-// CHECK4-NEXT: store i8 3, i8* [[TMP137]], align 8
+// CHECK4-NEXT: store i32 3, i32* [[TMP137]], align 8
// CHECK4-NEXT: store i64 3, i64* [[DEP_COUNTER_ADDR37]], align 8
// CHECK4-NEXT: [[TMP138:%.*]] = bitcast %struct.kmp_depend_info* [[TMP113]] to i8*
// CHECK4-NEXT: [[OMP_GLOBAL_THREAD_NUM38:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB13]])
diff --git a/clang/test/OpenMP/task_if_codegen.cpp b/clang/test/OpenMP/task_if_codegen.cpp
index 4bdcf06ecbfd9..c83de5029394a 100644
--- a/clang/test/OpenMP/task_if_codegen.cpp
+++ b/clang/test/OpenMP/task_if_codegen.cpp
@@ -196,7 +196,7 @@ int main() {
// CHECK1-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 1
// CHECK1-NEXT: store i64 4, i64* [[TMP21]], align 8
// CHECK1-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 2
-// CHECK1-NEXT: store i8 3, i8* [[TMP22]], align 8
+// CHECK1-NEXT: store i32 3, i32* [[TMP22]], align 8
// CHECK1-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR]], align 8
// CHECK1-NEXT: [[TMP23:%.*]] = bitcast %struct.kmp_depend_info* [[TMP18]] to i8*
// CHECK1-NEXT: [[TMP24:%.*]] = load i32, i32* @Arg, align 4
@@ -415,7 +415,7 @@ int main() {
// CHECK1-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 1
// CHECK1-NEXT: store i64 4, i64* [[TMP22]], align 8
// CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 2
-// CHECK1-NEXT: store i8 1, i8* [[TMP23]], align 8
+// CHECK1-NEXT: store i32 1, i32* [[TMP23]], align 8
// CHECK1-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR]], align 8
// CHECK1-NEXT: [[TMP24:%.*]] = bitcast %struct.kmp_depend_info* [[TMP18]] to i8*
// CHECK1-NEXT: [[TMP25:%.*]] = load i32, i32* [[ARG_ADDR]], align 4
@@ -442,7 +442,7 @@ int main() {
// CHECK1-NEXT: [[TMP35:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP32]], i32 0, i32 1
// CHECK1-NEXT: store i64 4, i64* [[TMP35]], align 8
// CHECK1-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP32]], i32 0, i32 2
-// CHECK1-NEXT: store i8 3, i8* [[TMP36]], align 8
+// CHECK1-NEXT: store i32 3, i32* [[TMP36]], align 8
// CHECK1-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR10]], align 8
// CHECK1-NEXT: [[TMP37:%.*]] = bitcast %struct.kmp_depend_info* [[TMP31]] to i8*
// CHECK1-NEXT: [[TMP38:%.*]] = load i32, i32* [[ARG_ADDR]], align 4
@@ -469,7 +469,7 @@ int main() {
// CHECK1-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP45]], i32 0, i32 1
// CHECK1-NEXT: store i64 4, i64* [[TMP48]], align 8
// CHECK1-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP45]], i32 0, i32 2
-// CHECK1-NEXT: store i8 3, i8* [[TMP49]], align 8
+// CHECK1-NEXT: store i32 3, i32* [[TMP49]], align 8
// CHECK1-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR17]], align 8
// CHECK1-NEXT: [[TMP50:%.*]] = bitcast %struct.kmp_depend_info* [[TMP44]] to i8*
// CHECK1-NEXT: [[TMP51:%.*]] = load i32, i32* [[ARG_ADDR]], align 4
@@ -813,7 +813,7 @@ int main() {
// CHECK2-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 1
// CHECK2-NEXT: store i64 4, i64* [[TMP21]], align 8
// CHECK2-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 2
-// CHECK2-NEXT: store i8 3, i8* [[TMP22]], align 8
+// CHECK2-NEXT: store i32 3, i32* [[TMP22]], align 8
// CHECK2-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR]], align 8
// CHECK2-NEXT: [[TMP23:%.*]] = bitcast %struct.kmp_depend_info* [[TMP18]] to i8*
// CHECK2-NEXT: [[TMP24:%.*]] = load i32, i32* @Arg, align 4
@@ -1032,7 +1032,7 @@ int main() {
// CHECK2-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 1
// CHECK2-NEXT: store i64 4, i64* [[TMP22]], align 8
// CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 2
-// CHECK2-NEXT: store i8 1, i8* [[TMP23]], align 8
+// CHECK2-NEXT: store i32 1, i32* [[TMP23]], align 8
// CHECK2-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR]], align 8
// CHECK2-NEXT: [[TMP24:%.*]] = bitcast %struct.kmp_depend_info* [[TMP18]] to i8*
// CHECK2-NEXT: [[TMP25:%.*]] = load i32, i32* [[ARG_ADDR]], align 4
@@ -1059,7 +1059,7 @@ int main() {
// CHECK2-NEXT: [[TMP35:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP32]], i32 0, i32 1
// CHECK2-NEXT: store i64 4, i64* [[TMP35]], align 8
// CHECK2-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP32]], i32 0, i32 2
-// CHECK2-NEXT: store i8 3, i8* [[TMP36]], align 8
+// CHECK2-NEXT: store i32 3, i32* [[TMP36]], align 8
// CHECK2-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR10]], align 8
// CHECK2-NEXT: [[TMP37:%.*]] = bitcast %struct.kmp_depend_info* [[TMP31]] to i8*
// CHECK2-NEXT: [[TMP38:%.*]] = load i32, i32* [[ARG_ADDR]], align 4
@@ -1086,7 +1086,7 @@ int main() {
// CHECK2-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP45]], i32 0, i32 1
// CHECK2-NEXT: store i64 4, i64* [[TMP48]], align 8
// CHECK2-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP45]], i32 0, i32 2
-// CHECK2-NEXT: store i8 3, i8* [[TMP49]], align 8
+// CHECK2-NEXT: store i32 3, i32* [[TMP49]], align 8
// CHECK2-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR17]], align 8
// CHECK2-NEXT: [[TMP50:%.*]] = bitcast %struct.kmp_depend_info* [[TMP44]] to i8*
// CHECK2-NEXT: [[TMP51:%.*]] = load i32, i32* [[ARG_ADDR]], align 4
@@ -1430,7 +1430,7 @@ int main() {
// CHECK5-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 1
// CHECK5-NEXT: store i64 4, i64* [[TMP21]], align 8
// CHECK5-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 2
-// CHECK5-NEXT: store i8 3, i8* [[TMP22]], align 8
+// CHECK5-NEXT: store i32 3, i32* [[TMP22]], align 8
// CHECK5-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR]], align 8
// CHECK5-NEXT: [[TMP23:%.*]] = bitcast %struct.kmp_depend_info* [[TMP18]] to i8*
// CHECK5-NEXT: [[TMP24:%.*]] = load i32, i32* @Arg, align 4
@@ -1649,7 +1649,7 @@ int main() {
// CHECK5-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 1
// CHECK5-NEXT: store i64 4, i64* [[TMP22]], align 8
// CHECK5-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 2
-// CHECK5-NEXT: store i8 1, i8* [[TMP23]], align 8
+// CHECK5-NEXT: store i32 1, i32* [[TMP23]], align 8
// CHECK5-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR]], align 8
// CHECK5-NEXT: [[TMP24:%.*]] = bitcast %struct.kmp_depend_info* [[TMP18]] to i8*
// CHECK5-NEXT: [[TMP25:%.*]] = load i32, i32* [[ARG_ADDR]], align 4
@@ -1676,7 +1676,7 @@ int main() {
// CHECK5-NEXT: [[TMP35:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP32]], i32 0, i32 1
// CHECK5-NEXT: store i64 4, i64* [[TMP35]], align 8
// CHECK5-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP32]], i32 0, i32 2
-// CHECK5-NEXT: store i8 3, i8* [[TMP36]], align 8
+// CHECK5-NEXT: store i32 3, i32* [[TMP36]], align 8
// CHECK5-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR10]], align 8
// CHECK5-NEXT: [[TMP37:%.*]] = bitcast %struct.kmp_depend_info* [[TMP31]] to i8*
// CHECK5-NEXT: [[TMP38:%.*]] = load i32, i32* [[ARG_ADDR]], align 4
@@ -1703,7 +1703,7 @@ int main() {
// CHECK5-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP45]], i32 0, i32 1
// CHECK5-NEXT: store i64 4, i64* [[TMP48]], align 8
// CHECK5-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP45]], i32 0, i32 2
-// CHECK5-NEXT: store i8 3, i8* [[TMP49]], align 8
+// CHECK5-NEXT: store i32 3, i32* [[TMP49]], align 8
// CHECK5-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR17]], align 8
// CHECK5-NEXT: [[TMP50:%.*]] = bitcast %struct.kmp_depend_info* [[TMP44]] to i8*
// CHECK5-NEXT: [[TMP51:%.*]] = load i32, i32* [[ARG_ADDR]], align 4
@@ -2047,7 +2047,7 @@ int main() {
// CHECK6-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 1
// CHECK6-NEXT: store i64 4, i64* [[TMP21]], align 8
// CHECK6-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 2
-// CHECK6-NEXT: store i8 3, i8* [[TMP22]], align 8
+// CHECK6-NEXT: store i32 3, i32* [[TMP22]], align 8
// CHECK6-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR]], align 8
// CHECK6-NEXT: [[TMP23:%.*]] = bitcast %struct.kmp_depend_info* [[TMP18]] to i8*
// CHECK6-NEXT: [[TMP24:%.*]] = load i32, i32* @Arg, align 4
@@ -2266,7 +2266,7 @@ int main() {
// CHECK6-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 1
// CHECK6-NEXT: store i64 4, i64* [[TMP22]], align 8
// CHECK6-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP19]], i32 0, i32 2
-// CHECK6-NEXT: store i8 1, i8* [[TMP23]], align 8
+// CHECK6-NEXT: store i32 1, i32* [[TMP23]], align 8
// CHECK6-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR]], align 8
// CHECK6-NEXT: [[TMP24:%.*]] = bitcast %struct.kmp_depend_info* [[TMP18]] to i8*
// CHECK6-NEXT: [[TMP25:%.*]] = load i32, i32* [[ARG_ADDR]], align 4
@@ -2293,7 +2293,7 @@ int main() {
// CHECK6-NEXT: [[TMP35:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP32]], i32 0, i32 1
// CHECK6-NEXT: store i64 4, i64* [[TMP35]], align 8
// CHECK6-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP32]], i32 0, i32 2
-// CHECK6-NEXT: store i8 3, i8* [[TMP36]], align 8
+// CHECK6-NEXT: store i32 3, i32* [[TMP36]], align 8
// CHECK6-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR10]], align 8
// CHECK6-NEXT: [[TMP37:%.*]] = bitcast %struct.kmp_depend_info* [[TMP31]] to i8*
// CHECK6-NEXT: [[TMP38:%.*]] = load i32, i32* [[ARG_ADDR]], align 4
@@ -2320,7 +2320,7 @@ int main() {
// CHECK6-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP45]], i32 0, i32 1
// CHECK6-NEXT: store i64 4, i64* [[TMP48]], align 8
// CHECK6-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT_KMP_DEPEND_INFO]], %struct.kmp_depend_info* [[TMP45]], i32 0, i32 2
-// CHECK6-NEXT: store i8 3, i8* [[TMP49]], align 8
+// CHECK6-NEXT: store i32 3, i32* [[TMP49]], align 8
// CHECK6-NEXT: store i64 1, i64* [[DEP_COUNTER_ADDR17]], align 8
// CHECK6-NEXT: [[TMP50:%.*]] = bitcast %struct.kmp_depend_info* [[TMP44]] to i8*
// CHECK6-NEXT: [[TMP51:%.*]] = load i32, i32* [[ARG_ADDR]], align 4
diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h
index 9c23f159b9e73..66c7362ae6ce7 100644
--- a/openmp/runtime/src/kmp.h
+++ b/openmp/runtime/src/kmp.h
@@ -2244,15 +2244,24 @@ typedef union kmp_depnode kmp_depnode_t;
typedef struct kmp_depnode_list kmp_depnode_list_t;
typedef struct kmp_dephash_entry kmp_dephash_entry_t;
+#define KMP_DEP_IN 0x1
+#define KMP_DEP_OUT 0x2
+#define KMP_DEP_INOUT 0x3
+#define KMP_DEP_MTX 0x4
+#define KMP_DEP_SET 0x8
// Compiler sends us this info:
typedef struct kmp_depend_info {
kmp_intptr_t base_addr;
size_t len;
- struct {
- bool in : 1;
- bool out : 1;
- bool mtx : 1;
- } flags;
+ union {
+ kmp_uint32 flag;
+ struct {
+ unsigned in : 1;
+ unsigned out : 1;
+ unsigned mtx : 1;
+ unsigned set : 1;
+ } flags;
+ };
} kmp_depend_info_t;
// Internal structures to work with task dependencies:
@@ -2286,8 +2295,8 @@ union KMP_ALIGN_CACHE kmp_depnode {
struct kmp_dephash_entry {
kmp_intptr_t addr;
kmp_depnode_t *last_out;
- kmp_depnode_list_t *last_ins;
- kmp_depnode_list_t *last_mtxs;
+ kmp_depnode_list_t *last_set;
+ kmp_depnode_list_t *prev_set;
kmp_int32 last_flag;
kmp_lock_t *mtx_lock; /* is referenced by depnodes w/mutexinoutset dep */
kmp_dephash_entry_t *next_in_bucket;
diff --git a/openmp/runtime/src/kmp_taskdeps.cpp b/openmp/runtime/src/kmp_taskdeps.cpp
index 89a7dbcaddf47..162fb38e1eedd 100644
--- a/openmp/runtime/src/kmp_taskdeps.cpp
+++ b/openmp/runtime/src/kmp_taskdeps.cpp
@@ -149,9 +149,6 @@ static kmp_dephash_t *__kmp_dephash_create(kmp_info_t *thread,
return h;
}
-#define ENTRY_LAST_INS 0
-#define ENTRY_LAST_MTXS 1
-
static kmp_dephash_entry *__kmp_dephash_find(kmp_info_t *thread,
kmp_dephash_t **hash,
kmp_intptr_t addr) {
@@ -178,9 +175,9 @@ static kmp_dephash_entry *__kmp_dephash_find(kmp_info_t *thread,
#endif
entry->addr = addr;
entry->last_out = NULL;
- entry->last_ins = NULL;
- entry->last_mtxs = NULL;
- entry->last_flag = ENTRY_LAST_INS;
+ entry->last_set = NULL;
+ entry->prev_set = NULL;
+ entry->last_flag = 0;
entry->mtx_lock = NULL;
entry->next_in_bucket = h->buckets[bucket];
h->buckets[bucket] = entry;
@@ -313,96 +310,81 @@ __kmp_process_deps(kmp_int32 gtid, kmp_depnode_t *node, kmp_dephash_t **hash,
kmp_dephash_entry_t *info =
__kmp_dephash_find(thread, hash, dep->base_addr);
kmp_depnode_t *last_out = info->last_out;
- kmp_depnode_list_t *last_ins = info->last_ins;
- kmp_depnode_list_t *last_mtxs = info->last_mtxs;
-
- if (dep->flags.out) { // out --> clean lists of ins and mtxs if any
- if (last_ins || last_mtxs) {
- if (info->last_flag == ENTRY_LAST_INS) { // INS were last
- npredecessors +=
- __kmp_depnode_link_successor(gtid, thread, task, node, last_ins);
- } else { // MTXS were last
- npredecessors +=
- __kmp_depnode_link_successor(gtid, thread, task, node, last_mtxs);
- }
- __kmp_depnode_list_free(thread, last_ins);
- __kmp_depnode_list_free(thread, last_mtxs);
- info->last_ins = NULL;
- info->last_mtxs = NULL;
+ kmp_depnode_list_t *last_set = info->last_set;
+ kmp_depnode_list_t *prev_set = info->prev_set;
+
+ if (dep->flags.out) { // out or inout --> clean lists if any
+ if (last_set) {
+ npredecessors +=
+ __kmp_depnode_link_successor(gtid, thread, task, node, last_set);
+ __kmp_depnode_list_free(thread, last_set);
+ __kmp_depnode_list_free(thread, prev_set);
+ info->last_set = NULL;
+ info->prev_set = NULL;
+ info->last_flag = 0; // no sets in this dephash entry
} else {
npredecessors +=
__kmp_depnode_link_successor(gtid, thread, task, node, last_out);
}
__kmp_node_deref(thread, last_out);
- if (dep_barrier) {
+ if (!dep_barrier) {
+ info->last_out = __kmp_node_ref(node);
+ } else {
// if this is a sync point in the serial sequence, then the previous
// outputs are guaranteed to be completed after the execution of this
// task so the previous output nodes can be cleared.
info->last_out = NULL;
- } else {
- info->last_out = __kmp_node_ref(node);
}
- } else if (dep->flags.in) {
- // in --> link node to either last_out or last_mtxs, clean earlier deps
- if (last_mtxs) {
- npredecessors +=
- __kmp_depnode_link_successor(gtid, thread, task, node, last_mtxs);
- __kmp_node_deref(thread, last_out);
- info->last_out = NULL;
- if (info->last_flag == ENTRY_LAST_MTXS && last_ins) { // MTXS were last
- // clean old INS before creating new list
- __kmp_depnode_list_free(thread, last_ins);
- info->last_ins = NULL;
- }
- } else {
+ } else { // either IN or MTX or SET
+ if (info->last_flag == 0 || info->last_flag == dep->flag) {
+ // last_set either didn't exist or of same dep kind
// link node as successor of the last_out if any
npredecessors +=
__kmp_depnode_link_successor(gtid, thread, task, node, last_out);
- }
- info->last_flag = ENTRY_LAST_INS;
- info->last_ins = __kmp_add_node(thread, info->last_ins, node);
- } else {
- KMP_DEBUG_ASSERT(dep->flags.mtx == 1);
- // mtx --> link node to either last_out or last_ins, clean earlier deps
- if (last_ins) {
+ // link node as successor of all nodes in the prev_set if any
+ npredecessors +=
+ __kmp_depnode_link_successor(gtid, thread, task, node, prev_set);
+ } else { // last_set is of
diff erent dep kind, make it prev_set
+ // link node as successor of all nodes in the last_set
npredecessors +=
- __kmp_depnode_link_successor(gtid, thread, task, node, last_ins);
+ __kmp_depnode_link_successor(gtid, thread, task, node, last_set);
+ // clean last_out if any
__kmp_node_deref(thread, last_out);
info->last_out = NULL;
- if (info->last_flag == ENTRY_LAST_INS && last_mtxs) { // INS were last
- // clean old MTXS before creating new list
- __kmp_depnode_list_free(thread, last_mtxs);
- info->last_mtxs = NULL;
- }
- } else {
- // link node as successor of the last_out if any
- npredecessors +=
- __kmp_depnode_link_successor(gtid, thread, task, node, last_out);
- }
- info->last_flag = ENTRY_LAST_MTXS;
- info->last_mtxs = __kmp_add_node(thread, info->last_mtxs, node);
- if (info->mtx_lock == NULL) {
- info->mtx_lock = (kmp_lock_t *)__kmp_allocate(sizeof(kmp_lock_t));
- __kmp_init_lock(info->mtx_lock);
+ // clean prev_set if any
+ __kmp_depnode_list_free(thread, prev_set);
+ // move last_set to prev_set, new last_set will be allocated
+ info->prev_set = last_set;
+ info->last_set = NULL;
}
- KMP_DEBUG_ASSERT(node->dn.mtx_num_locks < MAX_MTX_DEPS);
- kmp_int32 m;
- // Save lock in node's array
- for (m = 0; m < MAX_MTX_DEPS; ++m) {
- // sort pointers in decreasing order to avoid potential livelock
- if (node->dn.mtx_locks[m] < info->mtx_lock) {
- KMP_DEBUG_ASSERT(node->dn.mtx_locks[node->dn.mtx_num_locks] == NULL);
- for (int n = node->dn.mtx_num_locks; n > m; --n) {
- // shift right all lesser non-NULL pointers
- KMP_DEBUG_ASSERT(node->dn.mtx_locks[n - 1] != NULL);
- node->dn.mtx_locks[n] = node->dn.mtx_locks[n - 1];
+ info->last_flag = dep->flag; // store dep kind of the last_set
+ info->last_set = __kmp_add_node(thread, info->last_set, node);
+
+ // check if we are processing MTX dependency
+ if (dep->flag == KMP_DEP_MTX) {
+ if (info->mtx_lock == NULL) {
+ info->mtx_lock = (kmp_lock_t *)__kmp_allocate(sizeof(kmp_lock_t));
+ __kmp_init_lock(info->mtx_lock);
+ }
+ KMP_DEBUG_ASSERT(node->dn.mtx_num_locks < MAX_MTX_DEPS);
+ kmp_int32 m;
+ // Save lock in node's array
+ for (m = 0; m < MAX_MTX_DEPS; ++m) {
+ // sort pointers in decreasing order to avoid potential livelock
+ if (node->dn.mtx_locks[m] < info->mtx_lock) {
+ KMP_DEBUG_ASSERT(!node->dn.mtx_locks[node->dn.mtx_num_locks]);
+ for (int n = node->dn.mtx_num_locks; n > m; --n) {
+ // shift right all lesser non-NULL pointers
+ KMP_DEBUG_ASSERT(node->dn.mtx_locks[n - 1] != NULL);
+ node->dn.mtx_locks[n] = node->dn.mtx_locks[n - 1];
+ }
+ node->dn.mtx_locks[m] = info->mtx_lock;
+ break;
}
- node->dn.mtx_locks[m] = info->mtx_lock;
- break;
}
+ KMP_DEBUG_ASSERT(m < MAX_MTX_DEPS); // must break from loop
+ node->dn.mtx_num_locks++;
}
- KMP_DEBUG_ASSERT(m < MAX_MTX_DEPS); // must break from loop
- node->dn.mtx_num_locks++;
}
}
KA_TRACE(30, ("__kmp_process_deps<%d>: T#%d found %d predecessors\n", filter,
@@ -433,27 +415,25 @@ static bool __kmp_check_deps(kmp_int32 gtid, kmp_depnode_t *node,
// TODO: Different algorithm for large dep_list ( > 10 ? )
for (i = 0; i < ndeps; i++) {
if (dep_list[i].base_addr != 0) {
+ KMP_DEBUG_ASSERT(
+ dep_list[i].flag == KMP_DEP_IN || dep_list[i].flag == KMP_DEP_OUT ||
+ dep_list[i].flag == KMP_DEP_INOUT ||
+ dep_list[i].flag == KMP_DEP_MTX || dep_list[i].flag == KMP_DEP_SET);
for (int j = i + 1; j < ndeps; j++) {
if (dep_list[i].base_addr == dep_list[j].base_addr) {
- dep_list[i].flags.in |= dep_list[j].flags.in;
- dep_list[i].flags.out |=
- (dep_list[j].flags.out ||
- (dep_list[i].flags.in && dep_list[j].flags.mtx) ||
- (dep_list[i].flags.mtx && dep_list[j].flags.in));
- dep_list[i].flags.mtx =
- dep_list[i].flags.mtx | dep_list[j].flags.mtx &&
- !dep_list[i].flags.out;
+ if (dep_list[i].flag != dep_list[j].flag) {
+ // two
diff erent dependences on same address work identical to OUT
+ dep_list[i].flag = KMP_DEP_OUT;
+ }
dep_list[j].base_addr = 0; // Mark j element as void
}
}
- if (dep_list[i].flags.mtx) {
+ if (dep_list[i].flag == KMP_DEP_MTX) {
// limit number of mtx deps to MAX_MTX_DEPS per node
if (n_mtxs < MAX_MTX_DEPS && task != NULL) {
++n_mtxs;
} else {
- dep_list[i].flags.in = 1; // downgrade mutexinoutset to inout
- dep_list[i].flags.out = 1;
- dep_list[i].flags.mtx = 0;
+ dep_list[i].flag = KMP_DEP_OUT; // downgrade mutexinoutset to inout
}
}
}
@@ -562,6 +542,8 @@ kmp_int32 __kmpc_omp_task_with_deps(ident_t *loc_ref, kmp_int32 gtid,
ompt_deps[i].dependence_type = ompt_dependence_type_in;
else if (dep_list[i].flags.mtx)
ompt_deps[i].dependence_type = ompt_dependence_type_mutexinoutset;
+ else if (dep_list[i].flags.set)
+ ompt_deps[i].dependence_type = ompt_dependence_type_inoutset;
}
for (i = 0; i < ndeps_noalias; i++) {
ompt_deps[ndeps + i].variable.ptr = (void *)noalias_dep_list[i].base_addr;
@@ -574,6 +556,8 @@ kmp_int32 __kmpc_omp_task_with_deps(ident_t *loc_ref, kmp_int32 gtid,
else if (noalias_dep_list[i].flags.mtx)
ompt_deps[ndeps + i].dependence_type =
ompt_dependence_type_mutexinoutset;
+ else if (noalias_dep_list[i].flags.set)
+ ompt_deps[ndeps + i].dependence_type = ompt_dependence_type_inoutset;
}
ompt_callbacks.ompt_callback(ompt_callback_dependences)(
&(new_taskdata->ompt_task_info.task_data), ompt_deps, ompt_ndeps);
@@ -723,6 +707,8 @@ void __kmpc_omp_wait_deps(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps,
else if (dep_list[i].flags.mtx)
ompt_deps[ndeps + i].dependence_type =
ompt_dependence_type_mutexinoutset;
+ else if (dep_list[i].flags.set)
+ ompt_deps[ndeps + i].dependence_type = ompt_dependence_type_inoutset;
}
for (i = 0; i < ndeps_noalias; i++) {
ompt_deps[ndeps + i].variable.ptr = (void *)noalias_dep_list[i].base_addr;
@@ -735,6 +721,8 @@ void __kmpc_omp_wait_deps(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps,
else if (noalias_dep_list[i].flags.mtx)
ompt_deps[ndeps + i].dependence_type =
ompt_dependence_type_mutexinoutset;
+ else if (noalias_dep_list[i].flags.set)
+ ompt_deps[ndeps + i].dependence_type = ompt_dependence_type_inoutset;
}
ompt_callbacks.ompt_callback(ompt_callback_dependences)(
taskwait_task_data, ompt_deps, ompt_ndeps);
diff --git a/openmp/runtime/src/kmp_taskdeps.h b/openmp/runtime/src/kmp_taskdeps.h
index e4953610470a3..2f103453eb992 100644
--- a/openmp/runtime/src/kmp_taskdeps.h
+++ b/openmp/runtime/src/kmp_taskdeps.h
@@ -58,8 +58,8 @@ static inline void __kmp_dephash_free_entries(kmp_info_t *thread,
kmp_dephash_entry_t *next;
for (kmp_dephash_entry_t *entry = h->buckets[i]; entry; entry = next) {
next = entry->next_in_bucket;
- __kmp_depnode_list_free(thread, entry->last_ins);
- __kmp_depnode_list_free(thread, entry->last_mtxs);
+ __kmp_depnode_list_free(thread, entry->last_set);
+ __kmp_depnode_list_free(thread, entry->prev_set);
__kmp_node_deref(thread, entry->last_out);
if (entry->mtx_lock) {
__kmp_destroy_lock(entry->mtx_lock);
diff --git a/openmp/runtime/test/tasking/bug_nested_proxy_task.c b/openmp/runtime/test/tasking/bug_nested_proxy_task.c
index b4e8a54602878..6c2fa9f32161f 100644
--- a/openmp/runtime/test/tasking/bug_nested_proxy_task.c
+++ b/openmp/runtime/test/tasking/bug_nested_proxy_task.c
@@ -41,12 +41,12 @@ typedef struct ident {
} ident_t;
typedef struct kmp_depend_info {
- kmp_intptr_t base_addr;
- size_t len;
- struct {
- bool in:1;
- bool out:1;
- } flags;
+ kmp_intptr_t base_addr;
+ size_t len;
+// struct {
+// bool in:1;
+// bool out:1; }
+ int flags;
} kmp_depend_info_t;
struct kmp_task;
@@ -109,8 +109,7 @@ int main()
dep_info.base_addr = (long) &dep;
dep_info.len = sizeof(int);
// out = inout per spec and runtime expects this
- dep_info.flags.in = 1;
- dep_info.flags.out = 1;
+ dep_info.flags = 3; // inout
kmp_int32 gtid = __kmpc_global_thread_num(NULL);
kmp_task_t *proxy_task = __kmpc_omp_task_alloc(NULL,gtid,17,sizeof(kmp_task_t),0,&task_entry);
diff --git a/openmp/runtime/test/tasking/bug_proxy_task_dep_waiting.c b/openmp/runtime/test/tasking/bug_proxy_task_dep_waiting.c
index d48314ba1408b..d0382eed4c82d 100644
--- a/openmp/runtime/test/tasking/bug_proxy_task_dep_waiting.c
+++ b/openmp/runtime/test/tasking/bug_proxy_task_dep_waiting.c
@@ -38,12 +38,12 @@ typedef struct ident {
} ident_t;
typedef struct kmp_depend_info {
- kmp_intptr_t base_addr;
- size_t len;
- struct {
- bool in:1;
- bool out:1;
- } flags;
+ kmp_intptr_t base_addr;
+ size_t len;
+// struct {
+// bool in:1;
+// bool out:1; }
+ int flags;
} kmp_depend_info_t;
struct kmp_task;
@@ -104,8 +104,7 @@ int main()
dep_info.base_addr = (long) &dep;
dep_info.len = sizeof(int);
// out = inout per spec and runtime expects this
- dep_info.flags.in = 1;
- dep_info.flags.out = 1;
+ dep_info.flags = 3; // inout
kmp_int32 gtid = __kmpc_global_thread_num(NULL);
kmp_task_t *proxy_task = __kmpc_omp_task_alloc(NULL,gtid,17,sizeof(kmp_task_t),0,&task_entry);
diff --git a/openmp/runtime/test/tasking/hidden_helper_task/common.h b/openmp/runtime/test/tasking/hidden_helper_task/common.h
index 0761091e11df7..0f90f962debf0 100644
--- a/openmp/runtime/test/tasking/hidden_helper_task/common.h
+++ b/openmp/runtime/test/tasking/hidden_helper_task/common.h
@@ -13,11 +13,15 @@ using kmp_intptr_t = intptr_t;
typedef struct kmp_depend_info {
kmp_intptr_t base_addr;
size_t len;
- struct {
- bool in : 1;
- bool out : 1;
- bool mtx : 1;
- } flags;
+ union {
+ int flag;
+ struct {
+ unsigned in : 1;
+ unsigned out : 1;
+ unsigned mtx : 1;
+ unsigned reserved : 29; // 32 bits in total
+ } flags;
+ };
} kmp_depend_info_t;
typedef union kmp_cmplrdata {
diff --git a/openmp/runtime/test/tasking/hidden_helper_task/depend.cpp b/openmp/runtime/test/tasking/hidden_helper_task/depend.cpp
index 3eb28607e4629..6e4c4210d7106 100644
--- a/openmp/runtime/test/tasking/hidden_helper_task/depend.cpp
+++ b/openmp/runtime/test/tasking/hidden_helper_task/depend.cpp
@@ -65,6 +65,7 @@ int main(int argc, char *argv[]) {
kmp_depend_info_t depinfo1;
depinfo1.base_addr = reinterpret_cast<intptr_t>(&data);
+ depinfo1.flag = 0;
depinfo1.flags.out = 1;
depinfo1.len = 4;
@@ -80,6 +81,7 @@ int main(int argc, char *argv[]) {
kmp_depend_info_t depinfo2;
depinfo2.base_addr = reinterpret_cast<intptr_t>(&data);
+ depinfo2.flag = 0;
depinfo2.flags.in = 1;
depinfo2.flags.out = 1;
depinfo2.len = 4;
@@ -96,6 +98,7 @@ int main(int argc, char *argv[]) {
kmp_depend_info_t depinfo3;
depinfo3.base_addr = reinterpret_cast<intptr_t>(&data);
+ depinfo3.flag = 0;
depinfo3.flags.in = 1;
depinfo3.flags.out = 1;
depinfo3.len = 4;
@@ -112,6 +115,7 @@ int main(int argc, char *argv[]) {
kmp_depend_info_t depinfo4;
depinfo4.base_addr = reinterpret_cast<intptr_t>(&data);
+ depinfo4.flag = 0;
depinfo4.flags.in = 1;
depinfo4.flags.out = 1;
depinfo4.len = 4;
diff --git a/openmp/runtime/test/tasking/hidden_helper_task/gtid.cpp b/openmp/runtime/test/tasking/hidden_helper_task/gtid.cpp
index d5af89553caf0..8ed17fde17983 100644
--- a/openmp/runtime/test/tasking/hidden_helper_task/gtid.cpp
+++ b/openmp/runtime/test/tasking/hidden_helper_task/gtid.cpp
@@ -81,6 +81,7 @@ int main(int argc, char *argv[]) {
kmp_depend_info_t depinfo1;
depinfo1.base_addr = reinterpret_cast<intptr_t>(&depvar);
+ depinfo1.flag = 0;
depinfo1.flags.in = 1;
depinfo1.flags.out = 1;
depinfo1.len = 4;
@@ -96,6 +97,7 @@ int main(int argc, char *argv[]) {
kmp_depend_info_t depinfo2;
depinfo2.base_addr = reinterpret_cast<intptr_t>(&depvar);
+ depinfo2.flag = 0;
depinfo2.flags.in = 1;
depinfo2.flags.out = 1;
depinfo2.len = 4;
@@ -111,6 +113,7 @@ int main(int argc, char *argv[]) {
kmp_depend_info_t depinfo3;
depinfo3.base_addr = reinterpret_cast<intptr_t>(&depvar);
+ depinfo3.flag = 0;
depinfo3.flags.in = 1;
depinfo3.flags.out = 1;
depinfo3.len = 4;
diff --git a/openmp/runtime/test/tasking/omp51_task_dep_inoutset.c b/openmp/runtime/test/tasking/omp51_task_dep_inoutset.c
new file mode 100644
index 0000000000000..e7c3cf46b7988
--- /dev/null
+++ b/openmp/runtime/test/tasking/omp51_task_dep_inoutset.c
@@ -0,0 +1,258 @@
+// RUN: %libomp-compile-and-run
+// RUN: %libomp-cxx-compile-and-run
+// UNSUPPORTED: gcc
+
+// Tests OMP 5.0 task dependences "mutexinoutset" and 5.1 "inoutset",
+// emulates compiler codegen for new dep kinds
+// Mutually exclusive tasks get same input dependency info array
+//
+// Task tree created:
+// task0 - task1 (in)
+// \
+// task2 - task3 (inoutset)
+// /
+// task3 - task4 (in)
+// /
+// task6 <-->task7 (mutexinoutset)
+// \ /
+// task8 (in)
+//
+#include <stdio.h>
+#include <omp.h>
+
+#ifdef _WIN32
+#include <windows.h>
+#define mysleep(n) Sleep(n)
+#else
+#include <unistd.h>
+#define mysleep(n) usleep((n)*1000)
+#endif
+
+// to check the # of concurrent tasks (must be 1 for MTX, <3 for other kinds)
+static int volatile checker = 0;
+static int err = 0;
+#ifndef DELAY
+#define DELAY 100
+#endif
+
+// ---------------------------------------------------------------------------
+// internal data to emulate compiler codegen
+typedef struct DEP {
+ size_t addr;
+ size_t len;
+ int flags;
+} dep;
+typedef struct task {
+ void** shareds;
+ void* entry;
+ int part_id;
+ void* destr_thunk;
+ int priority;
+ long long device_id;
+ int f_priv;
+} task_t;
+#define TIED 1
+typedef int(*entry_t)(int, task_t*);
+typedef struct ID {
+ int reserved_1;
+ int flags;
+ int reserved_2;
+ int reserved_3;
+ char *psource;
+} id;
+// thunk routine for tasks with MTX dependency
+int thunk_m(int gtid, task_t* ptask) {
+ int th = omp_get_thread_num();
+ #pragma omp atomic
+ ++checker;
+ printf("task _%d, th %d\n", ptask->f_priv, th);
+ if (checker != 1) { // no more than 1 task at a time
+ err++;
+ printf("Error1, checker %d != 1\n", checker);
+ }
+ mysleep(DELAY);
+ if (checker != 1) { // no more than 1 task at a time
+ err++;
+ printf("Error2, checker %d != 1\n", checker);
+ }
+ #pragma omp atomic
+ --checker;
+ return 0;
+}
+// thunk routine for tasks with inoutset dependency
+int thunk_s(int gtid, task_t* ptask) {
+ int th = omp_get_thread_num();
+ #pragma omp atomic
+ ++checker;
+ printf("task _%d, th %d\n", ptask->f_priv, th);
+ if (checker > 2) { // no more than 2 tasks concurrently
+ err++;
+ printf("Error1, checker %d > 2\n", checker);
+ }
+ mysleep(DELAY);
+ if (checker > 2) { // no more than 2 tasks concurrently
+ err++;
+ printf("Error2, checker %d > 2\n", checker);
+ }
+ #pragma omp atomic
+ --checker;
+ return 0;
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+int __kmpc_global_thread_num(id*);
+extern task_t* __kmpc_omp_task_alloc(id *loc, int gtid, int flags,
+ size_t sz, size_t shar, entry_t rtn);
+int
+__kmpc_omp_task_with_deps(id *loc, int gtid, task_t *task, int nd, dep *dep_lst,
+ int nd_noalias, dep *noalias_dep_lst);
+static id loc = {0, 2, 0, 0, ";file;func;0;0;;"};
+#ifdef __cplusplus
+} // extern "C"
+#endif
+// End of internal data
+// ---------------------------------------------------------------------------
+
+int main()
+{
+ int i1,i2,i3;
+ omp_set_num_threads(4);
+ omp_set_dynamic(0);
+ #pragma omp parallel
+ {
+ #pragma omp single nowait
+ {
+ dep sdep[2];
+ task_t *ptr;
+ int gtid = __kmpc_global_thread_num(&loc);
+ int t = omp_get_thread_num();
+ #pragma omp task depend(in: i1, i2)
+ { int th = omp_get_thread_num();
+ printf("task 0_%d, th %d\n", t, th);
+ #pragma omp atomic
+ ++checker;
+ if (checker > 2) { // no more than 2 tasks concurrently
+ err++;
+ printf("Error1, checker %d > 2\n", checker);
+ }
+ mysleep(DELAY);
+ if (checker > 2) { // no more than 2 tasks concurrently
+ err++;
+ printf("Error1, checker %d > 2\n", checker);
+ }
+ #pragma omp atomic
+ --checker;
+ }
+ #pragma omp task depend(in: i1, i2)
+ { int th = omp_get_thread_num();
+ printf("task 1_%d, th %d\n", t, th);
+ #pragma omp atomic
+ ++checker;
+ if (checker > 2) { // no more than 2 tasks concurrently
+ err++;
+ printf("Error1, checker %d > 2\n", checker);
+ }
+ mysleep(DELAY);
+ if (checker > 2) { // no more than 2 tasks concurrently
+ err++;
+ printf("Error1, checker %d > 2\n", checker);
+ }
+ #pragma omp atomic
+ --checker;
+ }
+// compiler codegen start
+ // task2
+ ptr = __kmpc_omp_task_alloc(&loc, gtid, TIED, sizeof(task_t), 0, thunk_s);
+ sdep[0].addr = (size_t)&i1;
+ sdep[0].len = 0; // not used
+ sdep[0].flags = 1; // IN
+ sdep[1].addr = (size_t)&i2;
+ sdep[1].len = 0; // not used
+ sdep[1].flags = 8; // INOUTSET
+ ptr->f_priv = t + 10; // init single first-private variable
+ __kmpc_omp_task_with_deps(&loc, gtid, ptr, 2, sdep, 0, 0);
+
+ // task3
+ ptr = __kmpc_omp_task_alloc(&loc, gtid, TIED, sizeof(task_t), 0, thunk_s);
+ ptr->f_priv = t + 20; // init single first-private variable
+ __kmpc_omp_task_with_deps(&loc, gtid, ptr, 2, sdep, 0, 0);
+// compiler codegen end
+ t = omp_get_thread_num();
+ #pragma omp task depend(in: i1, i2)
+ { int th = omp_get_thread_num();
+ printf("task 4_%d, th %d\n", t, th);
+ #pragma omp atomic
+ ++checker;
+ if (checker > 2) { // no more than 2 tasks concurrently
+ err++;
+ printf("Error1, checker %d > 2\n", checker);
+ }
+ mysleep(DELAY);
+ if (checker > 2) { // no more than 2 tasks concurrently
+ err++;
+ printf("Error1, checker %d > 2\n", checker);
+ }
+ #pragma omp atomic
+ --checker;
+ }
+ #pragma omp task depend(in: i1, i2)
+ { int th = omp_get_thread_num();
+ printf("task 5_%d, th %d\n", t, th);
+ #pragma omp atomic
+ ++checker;
+ if (checker > 2) { // no more than 2 tasks concurrently
+ err++;
+ printf("Error1, checker %d > 2\n", checker);
+ }
+ mysleep(DELAY);
+ if (checker > 2) { // no more than 2 tasks concurrently
+ err++;
+ printf("Error1, checker %d > 2\n", checker);
+ }
+ #pragma omp atomic
+ --checker;
+ }
+// compiler codegen start
+ // task6
+ ptr = __kmpc_omp_task_alloc(&loc, gtid, TIED, sizeof(task_t), 0, thunk_m);
+ sdep[0].addr = (size_t)&i1;
+ sdep[0].len = 0; // not used
+ sdep[0].flags = 4; // MUTEXINOUTSET
+ sdep[1].addr = (size_t)&i3;
+ sdep[1].len = 0; // not used
+ sdep[1].flags = 4; // MUTEXINOUTSET
+ ptr->f_priv = t + 30; // init single first-private variable
+ __kmpc_omp_task_with_deps(&loc, gtid, ptr, 2, sdep, 0, 0);
+
+ // task7
+ ptr = __kmpc_omp_task_alloc(&loc, gtid, TIED, sizeof(task_t), 0, thunk_m);
+ ptr->f_priv = t + 40; // init single first-private variable
+ __kmpc_omp_task_with_deps(&loc, gtid, ptr, 2, sdep, 0, 0);
+// compiler codegen end
+ #pragma omp task depend(in: i3)
+ { int th = omp_get_thread_num();
+ printf("task 8_%d, th %d\n", t, th);
+ #pragma omp atomic
+ ++checker;
+ if (checker != 1) { // last task should run exclusively
+ err++;
+ printf("Error1, checker %d != 1\n", checker); }
+ mysleep(DELAY);
+ if (checker != 1) { // last task should run exclusively
+ err++;
+ printf("Error1, checker %d != 1\n", checker); }
+ #pragma omp atomic
+ --checker;
+ }
+ } // single
+ } // parallel
+ if (err == 0) {
+ printf("passed\n");
+ return 0;
+ } else {
+ printf("failed\n");
+ return 1;
+ }
+}
More information about the Openmp-commits
mailing list