summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/atomic_codegen.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-05-15 08:36:34 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-05-15 08:36:34 +0000
commitf0ab553fea2e01effa387ead1ae71e774f0793ab (patch)
tree499b32c00b984c12728bfd929499b30333dc3270 /clang/test/OpenMP/atomic_codegen.cpp
parentcdad63b33dc296806a243fdb4264392c692d90d2 (diff)
downloadbcm5719-llvm-f0ab553fea2e01effa387ead1ae71e774f0793ab.tar.gz
bcm5719-llvm-f0ab553fea2e01effa387ead1ae71e774f0793ab.zip
[OPENMP] Fixed bug in atomic update/capture/write constructs.
Fixed a bug with codegen for destination atomic l-value with padding and junk in this padding bytes. llvm-svn: 237422
Diffstat (limited to 'clang/test/OpenMP/atomic_codegen.cpp')
-rw-r--r--clang/test/OpenMP/atomic_codegen.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/test/OpenMP/atomic_codegen.cpp b/clang/test/OpenMP/atomic_codegen.cpp
index ba8c945de33..d030e15d2d4 100644
--- a/clang/test/OpenMP/atomic_codegen.cpp
+++ b/clang/test/OpenMP/atomic_codegen.cpp
@@ -37,6 +37,8 @@ void parallel_atomic_ewc() {
// CHECK: [[OMP_UPDATE]]
// CHECK: [[OLD_PHI_VAL:%.+]] = phi i32 [ [[OLD_VAL]], %{{.+}} ], [ [[NEW_OLD_VAL:%.+]], %[[OMP_UPDATE]] ]
// CHECK: [[NEW_VAL:%.+]] = srem i32 [[OLD_PHI_VAL]], [[B_VAL]]
+ // CHECK: store i32 [[NEW_VAL]], i32* [[TEMP:%.+]],
+ // CHECK: [[NEW_VAL:%.+]] = load i32, i32* [[TEMP]],
// CHECK: [[RES:%.+]] = cmpxchg i32* [[SCALAR_ADDR]], i32 [[OLD_PHI_VAL]], i32 [[NEW_VAL]] monotonic monotonic
// CHECK: [[NEW_OLD_VAL]] = extractvalue { i32, i1 } [[RES]], 0
// CHECK: [[COND:%.+]] = extractvalue { i32, i1 } [[RES]], 1
@@ -52,13 +54,15 @@ void parallel_atomic_ewc() {
// CHECK: br label %[[OMP_UPDATE:.+]]
// CHECK: [[OMP_UPDATE]]
// CHECK: [[OLD_PHI_VAL:%.+]] = phi i32 [ [[OLD_VAL]], %{{.+}} ], [ [[NEW_OLD_VAL:%.+]], %[[OMP_UPDATE]] ]
- // CHECK: [[NEW_VAL:%.+]] = srem i32 [[OLD_PHI_VAL]], [[B_VAL]]
+ // CHECK: [[NEW_CALC_VAL:%.+]] = srem i32 [[OLD_PHI_VAL]], [[B_VAL]]
+ // CHECK: store i32 [[NEW_CALC_VAL]], i32* [[TEMP:%.+]],
+ // CHECK: [[NEW_VAL:%.+]] = load i32, i32* [[TEMP]],
// CHECK: [[RES:%.+]] = cmpxchg i32* [[SCALAR_ADDR]], i32 [[OLD_PHI_VAL]], i32 [[NEW_VAL]] monotonic monotonic
// CHECK: [[NEW_OLD_VAL]] = extractvalue { i32, i1 } [[RES]], 0
// CHECK: [[COND:%.+]] = extractvalue { i32, i1 } [[RES]], 1
// CHECK: br i1 [[COND]], label %[[OMP_DONE:.+]], label %[[OMP_UPDATE]]
// CHECK: [[OMP_DONE]]
- // CHECK: store i32 [[NEW_VAL]], i32* @a,
+ // CHECK: store i32 [[NEW_CALC_VAL]], i32* @a,
// CHECK: invoke void @_ZN2StD1Ev(%struct.St* [[TEMP_ST_ADDR]])
#pragma omp atomic capture
a = St().get() %= b;
OpenPOWER on IntegriCloud