diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-04-27 07:56:03 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-04-27 07:56:03 +0000 |
commit | 02ef2b6250fd56d1a7f205128405b3f3314c133d (patch) | |
tree | 0b14d9608940bd6666778b6b1187b4ba875a8eff /test/OpenMP/simd_codegen.cpp | |
parent | a22abdd763de730e3eddd7b1ebd5367634e4e7a8 (diff) |
[OPENMP] Fix for codegen of captured variables in inlined directives.
Currently there is a problem with codegen of inlined directives inside
lambdas, it may cause a crash during codegen because of incorrect
capturing of variables. Patch fixes this problem.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267677 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/simd_codegen.cpp')
-rw-r--r-- | test/OpenMP/simd_codegen.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/OpenMP/simd_codegen.cpp b/test/OpenMP/simd_codegen.cpp index 852699d813..29828b3917 100644 --- a/test/OpenMP/simd_codegen.cpp +++ b/test/OpenMP/simd_codegen.cpp @@ -494,8 +494,10 @@ void linear(float *a) { #pragma omp simd linear(k : 3) // CHECK: store i64* [[VAL_ADDR]], i64** [[K_ADDR]], +// CHECK: [[VAL_REF:%.+]] = load i64*, i64** [[K_ADDR]], +// CHECK: store i64* [[VAL_REF]], i64** [[K_ADDR_REF:%.+]], // CHECK: store i32 0, i32* [[OMP_IV:%[^,]+]] -// CHECK: [[K_REF:%.+]] = load i64*, i64** [[K_ADDR]], +// CHECK: [[K_REF:%.+]] = load i64*, i64** [[K_ADDR_REF]], // CHECK: [[K0LOAD:%.+]] = load i64, i64* [[K_REF]] // CHECK-NEXT: store i64 [[K0LOAD]], i64* [[LIN0:%[^,]+]] @@ -528,7 +530,7 @@ void linear(float *a) { // CHECK: [[SIMPLE_LOOP_END]] // // Update linear vars after loop, as the loop was operating on a private version. -// CHECK: [[K_REF:%.+]] = load i64*, i64** [[K_ADDR]], +// CHECK: [[K_REF:%.+]] = load i64*, i64** [[K_ADDR_REF]], // CHECK: store i64* [[K_REF]], i64** [[K_PRIV_REF:%.+]], // CHECK: [[LIN0_2:%.+]] = load i64, i64* [[LIN0]] // CHECK-NEXT: [[LIN_ADD2:%.+]] = add nsw i64 [[LIN0_2]], 27 @@ -537,8 +539,10 @@ void linear(float *a) { // #pragma omp simd linear(val(k) : 3) +// CHECK: [[VAL_REF:%.+]] = load i64*, i64** [[K_ADDR]], +// CHECK: store i64* [[VAL_REF]], i64** [[K_ADDR_REF:%.+]], // CHECK: store i32 0, i32* [[OMP_IV:%[^,]+]] -// CHECK: [[K_REF:%.+]] = load i64*, i64** [[K_ADDR]], +// CHECK: [[K_REF:%.+]] = load i64*, i64** [[K_ADDR_REF]], // CHECK: [[K0LOAD:%.+]] = load i64, i64* [[K_REF]] // CHECK-NEXT: store i64 [[K0LOAD]], i64* [[LIN0:%[^,]+]] @@ -571,7 +575,7 @@ void linear(float *a) { // CHECK: [[SIMPLE_LOOP_END]] // // Update linear vars after loop, as the loop was operating on a private version. -// CHECK: [[K_REF:%.+]] = load i64*, i64** [[K_ADDR]], +// CHECK: [[K_REF:%.+]] = load i64*, i64** [[K_ADDR_REF]], // CHECK: store i64* [[K_REF]], i64** [[K_PRIV_REF:%.+]], // CHECK: [[LIN0_2:%.+]] = load i64, i64* [[LIN0]] // CHECK-NEXT: [[LIN_ADD2:%.+]] = add nsw i64 [[LIN0_2]], 27 |