diff options
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/TargetInfo.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index 0a6ebb897e..58cbf2e206 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/lib/CodeGen/TargetInfo.cpp @@ -2755,21 +2755,6 @@ llvm::Value *PPC64_SVR4_ABIInfo::EmitVAArg(llvm::Value *VAListAddr, llvm::Value *VAListAddrAsBPP = Builder.CreateBitCast(VAListAddr, BPP, "ap"); llvm::Value *Addr = Builder.CreateLoad(VAListAddrAsBPP, "ap.cur"); - // Handle address alignment for type alignment > 64 bits. Although - // long double normally requires 16-byte alignment, this is not the - // case when it is passed as an argument; so handle that special case. - const BuiltinType *BT = Ty->getAs<BuiltinType>(); - unsigned TyAlign = CGF.getContext().getTypeAlign(Ty) / 8; - - if (TyAlign > 8 && (!BT || !BT->isFloatingPoint())) { - assert((TyAlign & (TyAlign - 1)) == 0 && - "Alignment is not power of 2!"); - llvm::Value *AddrAsInt = Builder.CreatePtrToInt(Addr, CGF.Int64Ty); - AddrAsInt = Builder.CreateAdd(AddrAsInt, Builder.getInt64(TyAlign - 1)); - AddrAsInt = Builder.CreateAnd(AddrAsInt, Builder.getInt64(~(TyAlign - 1))); - Addr = Builder.CreateIntToPtr(AddrAsInt, BP); - } - // Update the va_list pointer. unsigned SizeInBytes = CGF.getContext().getTypeSize(Ty) / 8; unsigned Offset = llvm::RoundUpToAlignment(SizeInBytes, 8); |