forked from OSchip/llvm-project
parent
4aa3295a65
commit
3cc120a51e
|
@ -410,7 +410,7 @@ RValue CodeGenFunction::EmitLoadOfExtVectorElementLValue(LValue LV,
|
|||
Mask.push_back(llvm::ConstantInt::get(llvm::Type::Int32Ty, InIdx));
|
||||
}
|
||||
|
||||
llvm::Value *MaskV = VMContext.getConstantVector(&Mask[0], Mask.size());
|
||||
llvm::Value *MaskV = llvm::ConstantVector::get(&Mask[0], Mask.size());
|
||||
Vec = Builder.CreateShuffleVector(Vec,
|
||||
VMContext.getUndef(Vec->getType()),
|
||||
MaskV, "tmp");
|
||||
|
@ -615,7 +615,7 @@ void CodeGenFunction::EmitStoreThroughExtVectorComponentLValue(RValue Src,
|
|||
Mask[InIdx] = llvm::ConstantInt::get(llvm::Type::Int32Ty, i);
|
||||
}
|
||||
|
||||
llvm::Value *MaskV = VMContext.getConstantVector(&Mask[0], Mask.size());
|
||||
llvm::Value *MaskV = llvm::ConstantVector::get(&Mask[0], Mask.size());
|
||||
Vec = Builder.CreateShuffleVector(SrcVal,
|
||||
VMContext.getUndef(Vec->getType()),
|
||||
MaskV, "tmp");
|
||||
|
@ -631,7 +631,7 @@ void CodeGenFunction::EmitStoreThroughExtVectorComponentLValue(RValue Src,
|
|||
ExtMask.push_back(llvm::ConstantInt::get(llvm::Type::Int32Ty, i));
|
||||
for (; i != NumDstElts; ++i)
|
||||
ExtMask.push_back(VMContext.getUndef(llvm::Type::Int32Ty));
|
||||
llvm::Value *ExtMaskV = VMContext.getConstantVector(&ExtMask[0],
|
||||
llvm::Value *ExtMaskV = llvm::ConstantVector::get(&ExtMask[0],
|
||||
ExtMask.size());
|
||||
llvm::Value *ExtSrcVal =
|
||||
Builder.CreateShuffleVector(SrcVal,
|
||||
|
@ -647,7 +647,7 @@ void CodeGenFunction::EmitStoreThroughExtVectorComponentLValue(RValue Src,
|
|||
unsigned Idx = getAccessedFieldNo(i, Elts);
|
||||
Mask[Idx] = llvm::ConstantInt::get(llvm::Type::Int32Ty, i+NumDstElts);
|
||||
}
|
||||
llvm::Value *MaskV = VMContext.getConstantVector(&Mask[0], Mask.size());
|
||||
llvm::Value *MaskV = llvm::ConstantVector::get(&Mask[0], Mask.size());
|
||||
Vec = Builder.CreateShuffleVector(Vec, ExtSrcVal, MaskV, "tmp");
|
||||
}
|
||||
else {
|
||||
|
@ -932,7 +932,7 @@ llvm::Constant *GenerateConstantVector(llvm::LLVMContext &VMContext,
|
|||
for (unsigned i = 0, e = Elts.size(); i != e; ++i)
|
||||
CElts.push_back(llvm::ConstantInt::get(llvm::Type::Int32Ty, Elts[i]));
|
||||
|
||||
return VMContext.getConstantVector(&CElts[0], CElts.size());
|
||||
return llvm::ConstantVector::get(&CElts[0], CElts.size());
|
||||
}
|
||||
|
||||
LValue CodeGenFunction::
|
||||
|
@ -972,7 +972,7 @@ EmitExtVectorElementExpr(const ExtVectorElementExpr *E) {
|
|||
else
|
||||
CElts.push_back(BaseElts->getOperand(Indices[i]));
|
||||
}
|
||||
llvm::Constant *CV = VMContext.getConstantVector(&CElts[0], CElts.size());
|
||||
llvm::Constant *CV = llvm::ConstantVector::get(&CElts[0], CElts.size());
|
||||
return LValue::MakeExtVectorElt(Base.getExtVectorAddr(), CV,
|
||||
Base.getQualifiers());
|
||||
}
|
||||
|
|
|
@ -646,7 +646,7 @@ public:
|
|||
for (; i < NumElements; ++i)
|
||||
Elts.push_back(VMContext.getNullValue(ElemTy));
|
||||
|
||||
return VMContext.getConstantVector(VType, Elts);
|
||||
return llvm::ConstantVector::get(VType, Elts);
|
||||
}
|
||||
|
||||
llvm::Constant *VisitImplicitValueInitExpr(ImplicitValueInitExpr* E) {
|
||||
|
@ -901,7 +901,7 @@ llvm::Constant *CodeGenModule::EmitConstantExpr(const Expr *E,
|
|||
else
|
||||
Inits.push_back(llvm::ConstantFP::get(VMContext, Elt.getFloat()));
|
||||
}
|
||||
return VMContext.getConstantVector(&Inits[0], Inits.size());
|
||||
return llvm::ConstantVector::get(&Inits[0], Inits.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -476,7 +476,7 @@ Value *ScalarExprEmitter::EmitScalarConversion(Value *Src, QualType SrcType,
|
|||
for (unsigned i = 0; i < NumElements; i++)
|
||||
Args.push_back(llvm::ConstantInt::get(llvm::Type::Int32Ty, 0));
|
||||
|
||||
llvm::Constant *Mask = VMContext.getConstantVector(&Args[0], NumElements);
|
||||
llvm::Constant *Mask = llvm::ConstantVector::get(&Args[0], NumElements);
|
||||
llvm::Value *Yay = Builder.CreateShuffleVector(UnV, UnV, Mask, "splat");
|
||||
return Yay;
|
||||
}
|
||||
|
@ -555,7 +555,7 @@ Value *ScalarExprEmitter::VisitShuffleVectorExpr(ShuffleVectorExpr *E) {
|
|||
}
|
||||
Value* V1 = CGF.EmitScalarExpr(E->getExpr(0));
|
||||
Value* V2 = CGF.EmitScalarExpr(E->getExpr(1));
|
||||
Value* SV = VMContext.getConstantVector(indices.begin(), indices.size());
|
||||
Value* SV = llvm::ConstantVector::get(indices.begin(), indices.size());
|
||||
return Builder.CreateShuffleVector(V1, V2, SV, "shuffle");
|
||||
}
|
||||
|
||||
|
@ -1599,7 +1599,7 @@ Value *CodeGenFunction::EmitShuffleVector(Value* V1, Value *V2, ...) {
|
|||
const char *Name = va_arg(va, const char *);
|
||||
va_end(va);
|
||||
|
||||
llvm::Constant *Mask = VMContext.getConstantVector(&Args[0], NumElements);
|
||||
llvm::Constant *Mask = llvm::ConstantVector::get(&Args[0], NumElements);
|
||||
|
||||
return Builder.CreateShuffleVector(V1, V2, Mask, Name);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue