diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-09-04 11:26:21 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-09-04 11:26:21 +0000 |
commit | caacd53dde6ea46d03abf272aa996957433ce31d (patch) | |
tree | c3edcda81f236070fc44b8cd5f00528a8b9e8f88 /clang/test/OpenMP/simd_codegen.cpp | |
parent | cb405bf311d38c720601ad9cdac787d83f1a9e6f (diff) | |
download | llvm-caacd53dde6ea46d03abf272aa996957433ce31d.zip llvm-caacd53dde6ea46d03abf272aa996957433ce31d.tar.gz llvm-caacd53dde6ea46d03abf272aa996957433ce31d.tar.bz2 |
[OPENMP] Fix for http://llvm.org/PR24674: assertion failed and and abort trap
Fix processing of shared variables with reference types in OpenMP constructs. Previously, if the variable was not marked in one of the private clauses, the reference to this variable was emitted incorrectly and caused an assertion later.
llvm-svn: 246846
Diffstat (limited to 'clang/test/OpenMP/simd_codegen.cpp')
-rw-r--r-- | clang/test/OpenMP/simd_codegen.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/OpenMP/simd_codegen.cpp b/clang/test/OpenMP/simd_codegen.cpp index bea4647..0db371e 100644 --- a/clang/test/OpenMP/simd_codegen.cpp +++ b/clang/test/OpenMP/simd_codegen.cpp @@ -525,8 +525,10 @@ void linear(float *a) { // // Update linear vars after loop, as the loop was operating on a private version. // CHECK: [[K_REF:%.+]] = load i64*, i64** [[K_ADDR]], +// 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 +// CHECK-NEXT: [[K_REF:%.+]] = load i64*, i64** [[K_PRIV_REF]], // CHECK-NEXT: store i64 [[LIN_ADD2]], i64* [[K_REF]] // @@ -566,8 +568,10 @@ void linear(float *a) { // // Update linear vars after loop, as the loop was operating on a private version. // CHECK: [[K_REF:%.+]] = load i64*, i64** [[K_ADDR]], +// 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 +// CHECK-NEXT: [[K_REF:%.+]] = load i64*, i64** [[K_PRIV_REF]], // CHECK-NEXT: store i64 [[LIN_ADD2]], i64* [[K_REF]] // #pragma omp simd linear(uval(k) : 3) |