diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-09-11 10:29:41 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-09-11 10:29:41 +0000 |
commit | c71a4099cf4609a6c2605dfcf0a2522b18233fbd (patch) | |
tree | 4fa4fb69423b485986282a2c86f8073a258e7269 /clang/test/OpenMP/task_codegen.cpp | |
parent | c7776e41395ab49437c61eb0a64fc70c13a7d42a (diff) | |
download | bcm5719-llvm-c71a4099cf4609a6c2605dfcf0a2522b18233fbd.tar.gz bcm5719-llvm-c71a4099cf4609a6c2605dfcf0a2522b18233fbd.zip |
[OPENMP] Preserve alignment of the original variables for the captured references.
Patch makes codegen to preserve alignment of the shared variables captured and used in OpenMP regions.
llvm-svn: 247401
Diffstat (limited to 'clang/test/OpenMP/task_codegen.cpp')
-rw-r--r-- | clang/test/OpenMP/task_codegen.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/test/OpenMP/task_codegen.cpp b/clang/test/OpenMP/task_codegen.cpp index cbbfc44794a..ed59b3d3814 100644 --- a/clang/test/OpenMP/task_codegen.cpp +++ b/clang/test/OpenMP/task_codegen.cpp @@ -220,13 +220,15 @@ int main() { // CHECK: [[CMP:%.+]] = icmp ne i8 [[B_VAL]], 0 // CHECK: [[FINAL:%.+]] = select i1 [[CMP]], i32 2, i32 0 // CHECK: [[FLAGS:%.+]] = or i32 [[FINAL]], 1 -// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 [[FLAGS]], i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[TASK_ENTRY5:@.+]] to i32 (i32, i8*)*)) +// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 [[FLAGS]], i64 32, i64 8, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[TASK_ENTRY5:@.+]] to i32 (i32, i8*)*)) // CHECK: [[DESTRUCTORS_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]]{{.*}}* {{%.+}}, i32 0, i32 3 // CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** [[DESTRUCTORS_REF_PTR]] // CHECK: call i32 @__kmpc_omp_task([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]]) -#pragma omp task final(b) + int c __attribute__((aligned(128))); +#pragma omp task final(b) shared(c) { a = 4; + c = 5; } return a; } @@ -248,5 +250,6 @@ int main() { // CHECK: define internal i32 [[TASK_ENTRY5]](i32, [[KMP_TASK_T]]{{.*}}* noalias) // CHECK: store i32 4, i32* [[A_PTR:@.+]] +// CHECK: store i32 5, i32* [[C_PTR:%.+]], align 128 #endif |