summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/nvptx_SPMD_codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/OpenMP/nvptx_SPMD_codegen.cpp')
-rw-r--r--test/OpenMP/nvptx_SPMD_codegen.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/OpenMP/nvptx_SPMD_codegen.cpp b/test/OpenMP/nvptx_SPMD_codegen.cpp
index 738bbf34f7..5fa820fcba 100644
--- a/test/OpenMP/nvptx_SPMD_codegen.cpp
+++ b/test/OpenMP/nvptx_SPMD_codegen.cpp
@@ -8,6 +8,8 @@
#ifndef HEADER
#define HEADER
+int a;
+
// CHECK-NOT: @__omp_offloading_{{.+}}_exec_mode = weak constant i8 1
// CHECK-DAG: [[DISTR_LIGHT:@.+]] = private unnamed_addr constant %struct.ident_t { i32 0, i32 2050, i32 3, i32 0, i8* getelementptr inbounds
// CHECK-DAG: [[FOR_LIGHT:@.+]] = private unnamed_addr constant %struct.ident_t { i32 0, i32 514, i32 3, i32 0, i8* getelementptr inbounds
@@ -43,7 +45,7 @@ void foo() {
// CHECK: call void @__kmpc_spmd_kernel_init(i32 {{.+}}, i16 1, i16 {{.+}})
// CHECK-DAG: [[DISTR_FULL]]
// CHECK-DAG: [[FULL]]
-#pragma omp target teams distribute parallel for simd
+#pragma omp target teams distribute parallel for simd if(a)
for (int i = 0; i < 10; ++i)
;
#pragma omp target teams distribute parallel for simd schedule(static)
@@ -301,7 +303,7 @@ int a;
// CHECK-DAG: [[FULL]]
// CHECK: call void @__kmpc_spmd_kernel_init(i32 {{.+}}, i16 1, i16 {{.+}})
// CHECK-DAG: [[FULL]]
-#pragma omp target parallel for
+#pragma omp target parallel for if(a)
for (int i = 0; i < 10; ++i)
;
#pragma omp target parallel for schedule(static)
@@ -346,7 +348,7 @@ int a;
// CHECK: call void @__kmpc_spmd_kernel_init(i32 {{.+}}, i16 1, i16 {{.+}})
// CHECK-DAG: [[FULL]]
// CHECK-DAG: [[BAR_FULL]]
-#pragma omp target parallel
+#pragma omp target parallel if(a)
#pragma omp for simd
for (int i = 0; i < 10; ++i)
;