diff options
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGAtomic.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGAtomic.cpp b/clang/lib/CodeGen/CGAtomic.cpp index a0b6073f6bf..2af2264634e 100644 --- a/clang/lib/CodeGen/CGAtomic.cpp +++ b/clang/lib/CodeGen/CGAtomic.cpp @@ -976,7 +976,7 @@ RValue AtomicInfo::convertIntToValue(llvm::Value *IntVal, auto *ValTy = CGF.ConvertTypeForMem(ValueTy); if (ValTy->isIntegerTy()) { assert(IntVal->getType() == ValTy && "Different integer types."); - return RValue::get(IntVal); + return RValue::get(CGF.EmitFromMemory(IntVal, ValueTy)); } else if (ValTy->isPointerTy()) return RValue::get(CGF.Builder.CreateIntToPtr(IntVal, ValTy)); else if (llvm::CastInst::isBitCastable(IntVal->getType(), ValTy)) diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index cf23e6dc9e1..a7797c512ed 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -1144,7 +1144,7 @@ llvm::Value *CodeGenFunction::EmitLoadOfScalar(llvm::Value *Addr, bool Volatile, LValue lvalue = LValue::MakeAddr(Addr, Ty, CharUnits::fromQuantity(Alignment), getContext(), TBAAInfo); - return EmitFromMemory(EmitAtomicLoad(lvalue, Loc).getScalarVal(), Ty); + return EmitAtomicLoad(lvalue, Loc).getScalarVal(); } llvm::LoadInst *Load = Builder.CreateLoad(Addr); |

