diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-03-30 18:31:07 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-03-30 18:31:07 +0000 |
commit | 03f270c900e1f8563419fdd302683a9503e98722 (patch) | |
tree | 9da96a39200b5080cc79dc9b6e0fee4d76bb4cc8 /clang/test/OpenMP/declare_target_link_codegen.cpp | |
parent | 399b46c98d638a9a6694091b2ba8c511052a3999 (diff) | |
download | bcm5719-llvm-03f270c900e1f8563419fdd302683a9503e98722.tar.gz bcm5719-llvm-03f270c900e1f8563419fdd302683a9503e98722.zip |
[OPENMP] Added emission of offloading data sections for declare target
variables.
Added emission of the offloading data sections for the variables within
declare target regions + fixes emission of the declare target variables
marked as declare target not within the declare target region.
llvm-svn: 328888
Diffstat (limited to 'clang/test/OpenMP/declare_target_link_codegen.cpp')
-rw-r--r-- | clang/test/OpenMP/declare_target_link_codegen.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/test/OpenMP/declare_target_link_codegen.cpp b/clang/test/OpenMP/declare_target_link_codegen.cpp index 3aff3fbecc4..ceeb5a070cc 100644 --- a/clang/test/OpenMP/declare_target_link_codegen.cpp +++ b/clang/test/OpenMP/declare_target_link_codegen.cpp @@ -19,9 +19,12 @@ // HOST: @c = external global i32, // DEVICE-NOT: @c = -// CHECK: @c_decl_tgt_link_ptr = common global i32* null +// DEVICE: @c_decl_tgt_link_ptr = common global i32* null +// HOST: @c_decl_tgt_link_ptr = global i32* @c // HOST: [[SIZES:@.+]] = private unnamed_addr constant [2 x i64] [i64 4, i64 4] // HOST: [[MAPTYPES:@.+]] = private unnamed_addr constant [2 x i64] [i64 35, i64 531] +// CHECK: @.omp_offloading.entry_name{{.*}} = internal unnamed_addr constant [{{[0-9]+}} x i8] c"c_decl_tgt_link_ptr\00" +// CHECK: @.omp_offloading.entry.c_decl_tgt_link_ptr = weak constant %struct.__tgt_offload_entry { i8* bitcast (i32** @c_decl_tgt_link_ptr to i8*), i8* getelementptr inbounds ([{{[0-9]+}} x i8], [{{[0-9]+}} x i8]* @.omp_offloading.entry_name, i32 0, i32 0), i64 8, i32 0, i32 0 }, section ".omp_offloading.entries", align 1 // CHECK: @llvm.used = appending global [1 x i8*] [i8* bitcast (i32** @c_decl_tgt_link_ptr to i8*)] extern int c; @@ -61,4 +64,5 @@ int maini1() { // HOST: [[C:%.*]] = load i32, i32* @c, // HOST: store i32 [[C]], i32* % +// CHECK: !{i32 1, !"c_decl_tgt_link_ptr", i32 0, i32 {{[0-9]+}}} #endif // HEADER |