summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprComplex.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-02-14 01:35:12 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-02-14 01:35:12 +0000
commita5b195a1dcc252916f68cadb81163a47d8995ee3 (patch)
tree6fd0ab86477d2a77778c391df234200c6412390e /clang/lib/CodeGen/CGExprComplex.cpp
parent6866a3c6f4c6ac4c368f4292b6567e456646b07b (diff)
downloadbcm5719-llvm-a5b195a1dcc252916f68cadb81163a47d8995ee3.tar.gz
bcm5719-llvm-a5b195a1dcc252916f68cadb81163a47d8995ee3.zip
Revert "Revert r229082 for a bit, it caused PR22577."
This reverts commit r229123. It was a red herring, the bug was present without r229082. llvm-svn: 229205
Diffstat (limited to 'clang/lib/CodeGen/CGExprComplex.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprComplex.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp
index ceec85a9a89..1fea5a127c0 100644
--- a/clang/lib/CodeGen/CGExprComplex.cpp
+++ b/clang/lib/CodeGen/CGExprComplex.cpp
@@ -336,7 +336,8 @@ ComplexPairTy ComplexExprEmitter::EmitLoadOfLValue(LValue lvalue,
/// specified value pointer.
void ComplexExprEmitter::EmitStoreOfComplex(ComplexPairTy Val, LValue lvalue,
bool isInit) {
- if (lvalue.getType()->isAtomicType())
+ if (lvalue.getType()->isAtomicType() ||
+ (!isInit && CGF.LValueIsSuitableForInlineAtomic(lvalue)))
return CGF.EmitAtomicStore(RValue::getComplex(Val), lvalue, isInit);
llvm::Value *Ptr = lvalue.getAddress();
OpenPOWER on IntegriCloud