diff options
| author | Alexey Bataev <a.bataev@outlook.com> | 2021-07-01 04:16:56 -0700 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@outlook.com> | 2022-02-24 11:49:14 -0800 |
| commit | 638938117aeae5518d6cacd066ffd9830ef4fc9a (patch) | |
| tree | ec0bc4ba30bef2c63746be97a256ad933807c051 /clang/test/OpenMP/target_data_map_pointer_array_subscript_codegen.cpp | |
| parent | 140c13d3184d9320493111d55103229d2ad2699b (diff) | |
[OPENMP]Fix PR50347: Mapping of global scope deep object fails.
Changed the we handle llvm::Constants in sizes arrays. ConstExprs and
GlobalValues cannot be used as initializers, need to put them at the
runtime, otherwise there wight be the compilation errors.
Differential Revision: https://reviews.llvm.org/D105297
Diffstat (limited to 'clang/test/OpenMP/target_data_map_pointer_array_subscript_codegen.cpp')
| -rw-r--r-- | clang/test/OpenMP/target_data_map_pointer_array_subscript_codegen.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/OpenMP/target_data_map_pointer_array_subscript_codegen.cpp b/clang/test/OpenMP/target_data_map_pointer_array_subscript_codegen.cpp index 779d6ee7eb21..de35e68af19c 100644 --- a/clang/test/OpenMP/target_data_map_pointer_array_subscript_codegen.cpp +++ b/clang/test/OpenMP/target_data_map_pointer_array_subscript_codegen.cpp @@ -35,6 +35,7 @@ MyObject *objects; // CHECK-DAG: [[SIZES0:@.+]] = private unnamed_addr constant [1 x i64] [i64 {{8|4}}] // CHECK-DAG: [[MAPS0:@.+]] = private unnamed_addr constant [1 x i64] [i64 17] +// CHECK-DAG: [[SIZES1:@.+]] = private unnamed_addr global [2 x i64] [i64 0, i64 4] // CHECK-DAG: [[MAPS1:@.+]] = private unnamed_addr constant [2 x i64] [i64 0, i64 281474976710673] // CHECK: @main int main(void) { @@ -47,7 +48,7 @@ int main(void) { // CHECK: [[BPTR0:%.+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* %{{.+}}, i32 0, i32 0 // CHECK: [[BPTRC0:%.+]] = bitcast i8** [[BPTR0]] to %struct.MyObject** // CHECK: store %struct.MyObject* [[OBJ]], %struct.MyObject** [[BPTRC0]], -// CHECK: call void @__tgt_target_data_begin_mapper(%struct.ident_t* @{{.+}}, i64 -1, i32 2, i8** %{{.+}}, i8** %{{.+}}, i64* %{{.+}}, i64* getelementptr inbounds ([2 x i64], [2 x i64]* [[MAPS1]], i32 0, i32 0), i8** null, i8** null) +// CHECK: call void @__tgt_target_data_begin_mapper(%struct.ident_t* @{{.+}}, i64 -1, i32 2, i8** %{{.+}}, i8** %{{.+}}, i64* getelementptr inbounds ([2 x i64], [2 x i64]* [[SIZES1]], i32 0, i32 0), i64* getelementptr inbounds ([2 x i64], [2 x i64]* [[MAPS1]], i32 0, i32 0), i8** null, i8** null) #pragma omp target enter data map(to : objects[1].arr [0:1]) return 0; |
