Differential D89994 Diff 301038 clang/test/OpenMP/nvptx_distribute_parallel_generic_mode_codegen.cpp
Changeset View
Changeset View
Standalone View
Standalone View
clang/test/OpenMP/nvptx_distribute_parallel_generic_mode_codegen.cpp
Show All 29 Lines | |||||
#pragma omp target teams map(tofrom:a) | #pragma omp target teams map(tofrom:a) | ||||
#pragma omp distribute parallel for firstprivate(b) lastprivate(c) if(a) | #pragma omp distribute parallel for firstprivate(b) lastprivate(c) if(a) | ||||
for (int i= 0; i < argc; ++i) | for (int i= 0; i < argc; ++i) | ||||
a = foo(&i) + foo(&a) + foo(&b[i]) + foo(&c[i]) + foo(&d[i]); | a = foo(&i) + foo(&a) + foo(&b[i]) + foo(&c[i]) + foo(&d[i]); | ||||
return 0; | return 0; | ||||
} | } | ||||
// SEQ: [[MEM_TY:%.+]] = type { [128 x i8] } | // SEQ: [[MEM_TY:%.+]] = type { [128 x i8] } | ||||
// SEQ-DAG: [[SHARED_GLOBAL_RD:@.+]] = common addrspace(3) global [[MEM_TY]] zeroinitializer | // SEQ-DAG: [[SHARED_GLOBAL_RD:@.+]] = weak addrspace(3) global [[MEM_TY]] undef | ||||
// SEQ-DAG: [[KERNEL_PTR:@.+]] = internal addrspace(3) global i8* null | // SEQ-DAG: [[KERNEL_PTR:@.+]] = internal addrspace(3) global i8* undef | ||||
// SEQ-DAG: [[KERNEL_SIZE:@.+]] = internal unnamed_addr constant i{{64|32}} 40 | // SEQ-DAG: [[KERNEL_SIZE:@.+]] = internal unnamed_addr constant i{{64|32}} 40 | ||||
// SEQ-DAG: [[KERNEL_SHARED:@.+]] = internal unnamed_addr constant i16 1 | // SEQ-DAG: [[KERNEL_SHARED:@.+]] = internal unnamed_addr constant i16 1 | ||||
// CHECK-DAG: @__omp_offloading_{{.*}}_main_[[LINE:l.+]]_exec_mode = weak constant i8 0 | // CHECK-DAG: @__omp_offloading_{{.*}}_main_[[LINE:l.+]]_exec_mode = weak constant i8 0 | ||||
// CHECK: define weak void @__omp_offloading_{{.*}}_main_[[LINE]]([10 x i32]* nonnull align 4 dereferenceable(40) %{{.+}}, [10 x i32]* nonnull align 4 dereferenceable(40) %{{.+}}, i32* nonnull align 4 dereferenceable(4) %{{.+}}, i{{64|32}} %{{.+}}, [10 x i32]* nonnull align 4 dereferenceable(40) %{{.+}}) | // CHECK: define weak void @__omp_offloading_{{.*}}_main_[[LINE]]([10 x i32]* nonnull align 4 dereferenceable(40) %{{.+}}, [10 x i32]* nonnull align 4 dereferenceable(40) %{{.+}}, i32* nonnull align 4 dereferenceable(4) %{{.+}}, i{{64|32}} %{{.+}}, [10 x i32]* nonnull align 4 dereferenceable(40) %{{.+}}) | ||||
// SEQ: [[SHARED:%.+]] = load i16, i16* [[KERNEL_SHARED]], | // SEQ: [[SHARED:%.+]] = load i16, i16* [[KERNEL_SHARED]], | ||||
// SEQ: [[SIZE:%.+]] = load i{{64|32}}, i{{64|32}}* [[KERNEL_SIZE]], | // SEQ: [[SIZE:%.+]] = load i{{64|32}}, i{{64|32}}* [[KERNEL_SIZE]], | ||||
// SEQ: call void @__kmpc_get_team_static_memory(i16 1, i8* addrspacecast (i8 addrspace(3)* getelementptr inbounds ([[MEM_TY]], [[MEM_TY]] addrspace(3)* [[SHARED_GLOBAL_RD]], i32 0, i32 0, i32 0) to i8*), i{{64|32}} [[SIZE]], i16 [[SHARED]], i8** addrspacecast (i8* addrspace(3)* [[KERNEL_PTR]] to i8**)) | // SEQ: call void @__kmpc_get_team_static_memory(i16 1, i8* addrspacecast (i8 addrspace(3)* getelementptr inbounds ([[MEM_TY]], [[MEM_TY]] addrspace(3)* [[SHARED_GLOBAL_RD]], i32 0, i32 0, i32 0) to i8*), i{{64|32}} [[SIZE]], i16 [[SHARED]], i8** addrspacecast (i8* addrspace(3)* [[KERNEL_PTR]] to i8**)) | ||||
Show All 22 Lines |