Skip to content

Commit 8508c1d

Browse files
committedJun 3, 2018
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. llvm-svn: 333850
1 parent 7c4446c commit 8508c1d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
 

‎clang/lib/CodeGen/CGBuiltin.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -8263,32 +8263,32 @@ static Value *getMaskVecValue(CodeGenFunction &CGF, Value *Mask,
82638263
}
82648264

82658265
static Value *EmitX86MaskedStore(CodeGenFunction &CGF,
8266-
ArrayRef<Value *> Ops,
8266+
SmallVectorImpl<Value *> &Ops,
82678267
unsigned Align) {
82688268
// Cast the pointer to right type.
8269-
Value *Ptr = CGF.Builder.CreateBitCast(Ops[0],
8269+
Ops[0] = CGF.Builder.CreateBitCast(Ops[0],
82708270
llvm::PointerType::getUnqual(Ops[1]->getType()));
82718271

82728272
Value *MaskVec = getMaskVecValue(CGF, Ops[2],
82738273
Ops[1]->getType()->getVectorNumElements());
82748274

8275-
return CGF.Builder.CreateMaskedStore(Ops[1], Ptr, Align, MaskVec);
8275+
return CGF.Builder.CreateMaskedStore(Ops[1], Ops[0], Align, MaskVec);
82768276
}
82778277

82788278
static Value *EmitX86MaskedLoad(CodeGenFunction &CGF,
8279-
ArrayRef<Value *> Ops, unsigned Align) {
8279+
SmallVectorImpl<Value *> &Ops, unsigned Align) {
82808280
// Cast the pointer to right type.
8281-
Value *Ptr = CGF.Builder.CreateBitCast(Ops[0],
8281+
Ops[0] = CGF.Builder.CreateBitCast(Ops[0],
82828282
llvm::PointerType::getUnqual(Ops[1]->getType()));
82838283

82848284
Value *MaskVec = getMaskVecValue(CGF, Ops[2],
82858285
Ops[1]->getType()->getVectorNumElements());
82868286

8287-
return CGF.Builder.CreateMaskedLoad(Ptr, Align, MaskVec, Ops[1]);
8287+
return CGF.Builder.CreateMaskedLoad(Ops[0], Align, MaskVec, Ops[1]);
82888288
}
82898289

82908290
static Value *EmitX86MaskLogic(CodeGenFunction &CGF, Instruction::BinaryOps Opc,
8291-
unsigned NumElts, ArrayRef<Value *> Ops,
8291+
unsigned NumElts, SmallVectorImpl<Value *> &Ops,
82928292
bool InvertLHS = false) {
82938293
Value *LHS = getMaskVecValue(CGF, Ops[0], NumElts);
82948294
Value *RHS = getMaskVecValue(CGF, Ops[1], NumElts);
@@ -8301,7 +8301,7 @@ static Value *EmitX86MaskLogic(CodeGenFunction &CGF, Instruction::BinaryOps Opc,
83018301
}
83028302

83038303
static Value *EmitX86SubVectorBroadcast(CodeGenFunction &CGF,
8304-
ArrayRef<Value *> Ops,
8304+
SmallVectorImpl<Value *> &Ops,
83058305
llvm::Type *DstTy,
83068306
unsigned SrcSizeInBits,
83078307
unsigned Align) {

0 commit comments

Comments
 (0)