From: Craig Topper Date: Sun, 3 Jun 2018 18:41:22 +0000 (+0000) Subject: Revert r333848 "[X86] Pass ArrayRef instead of SmallVectorImpl& to the X86 builtin... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b442eb45fdf5147e44493d6c452d6dcb07877b6b;p=clang Revert r333848 "[X86] Pass ArrayRef instead of SmallVectorImpl& to the X86 builtin helper functions. NFC" Looks like I missed some changes to make this work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@333850 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index 72e2ccea1f..e078a091a7 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -8263,32 +8263,32 @@ static Value *getMaskVecValue(CodeGenFunction &CGF, Value *Mask, } static Value *EmitX86MaskedStore(CodeGenFunction &CGF, - ArrayRef Ops, + SmallVectorImpl &Ops, unsigned Align) { // Cast the pointer to right type. - Value *Ptr = CGF.Builder.CreateBitCast(Ops[0], + Ops[0] = CGF.Builder.CreateBitCast(Ops[0], llvm::PointerType::getUnqual(Ops[1]->getType())); Value *MaskVec = getMaskVecValue(CGF, Ops[2], Ops[1]->getType()->getVectorNumElements()); - return CGF.Builder.CreateMaskedStore(Ops[1], Ptr, Align, MaskVec); + return CGF.Builder.CreateMaskedStore(Ops[1], Ops[0], Align, MaskVec); } static Value *EmitX86MaskedLoad(CodeGenFunction &CGF, - ArrayRef Ops, unsigned Align) { + SmallVectorImpl &Ops, unsigned Align) { // Cast the pointer to right type. - Value *Ptr = CGF.Builder.CreateBitCast(Ops[0], + Ops[0] = CGF.Builder.CreateBitCast(Ops[0], llvm::PointerType::getUnqual(Ops[1]->getType())); Value *MaskVec = getMaskVecValue(CGF, Ops[2], Ops[1]->getType()->getVectorNumElements()); - return CGF.Builder.CreateMaskedLoad(Ptr, Align, MaskVec, Ops[1]); + return CGF.Builder.CreateMaskedLoad(Ops[0], Align, MaskVec, Ops[1]); } static Value *EmitX86MaskLogic(CodeGenFunction &CGF, Instruction::BinaryOps Opc, - unsigned NumElts, ArrayRef Ops, + unsigned NumElts, SmallVectorImpl &Ops, bool InvertLHS = false) { Value *LHS = getMaskVecValue(CGF, Ops[0], NumElts); Value *RHS = getMaskVecValue(CGF, Ops[1], NumElts); @@ -8301,7 +8301,7 @@ static Value *EmitX86MaskLogic(CodeGenFunction &CGF, Instruction::BinaryOps Opc, } static Value *EmitX86SubVectorBroadcast(CodeGenFunction &CGF, - ArrayRef Ops, + SmallVectorImpl &Ops, llvm::Type *DstTy, unsigned SrcSizeInBits, unsigned Align) {