@@ -190,37 +190,38 @@ class VPBuilder {
190190 new VPInstruction (Opcode, Operands, WrapFlags, DL, Name));
191191 }
192192
193- VPValue *createNot (VPValue *Operand, DebugLoc DL = DebugLoc::getUnknown(),
194- const Twine &Name = "") {
193+ VPInstruction *createNot (VPValue *Operand,
194+ DebugLoc DL = DebugLoc::getUnknown(),
195+ const Twine &Name = "") {
195196 return createInstruction (VPInstruction::Not, {Operand}, DL, Name);
196197 }
197198
198- VPValue *createAnd (VPValue *LHS, VPValue *RHS,
199- DebugLoc DL = DebugLoc::getUnknown(),
200- const Twine &Name = "") {
199+ VPInstruction *createAnd (VPValue *LHS, VPValue *RHS,
200+ DebugLoc DL = DebugLoc::getUnknown(),
201+ const Twine &Name = "") {
201202 return createInstruction (Instruction::BinaryOps::And, {LHS, RHS}, DL, Name);
202203 }
203204
204- VPValue *createOr (VPValue *LHS, VPValue *RHS,
205- DebugLoc DL = DebugLoc::getUnknown(),
206- const Twine &Name = "") {
205+ VPInstruction *createOr (VPValue *LHS, VPValue *RHS,
206+ DebugLoc DL = DebugLoc::getUnknown(),
207+ const Twine &Name = "") {
207208
208209 return tryInsertInstruction (new VPInstruction (
209210 Instruction::BinaryOps::Or, {LHS, RHS},
210211 VPRecipeWithIRFlags::DisjointFlagsTy (false ), DL, Name));
211212 }
212213
213- VPValue *createLogicalAnd (VPValue *LHS, VPValue *RHS,
214- DebugLoc DL = DebugLoc::getUnknown(),
215- const Twine &Name = "") {
214+ VPInstruction *createLogicalAnd (VPValue *LHS, VPValue *RHS,
215+ DebugLoc DL = DebugLoc::getUnknown(),
216+ const Twine &Name = "") {
216217 return tryInsertInstruction (
217218 new VPInstruction (VPInstruction::LogicalAnd, {LHS, RHS}, DL, Name));
218219 }
219220
220- VPValue * createSelect (VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal,
221- DebugLoc DL = DebugLoc::getUnknown() ,
222- const Twine &Name = "",
223- std::optional<FastMathFlags> FMFs = std::nullopt) {
221+ VPInstruction *
222+ createSelect (VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal ,
223+ DebugLoc DL = DebugLoc::getUnknown(), const Twine &Name = "",
224+ std::optional<FastMathFlags> FMFs = std::nullopt) {
224225 auto *Select =
225226 FMFs ? new VPInstruction (Instruction::Select, {Cond, TrueVal, FalseVal},
226227 *FMFs, DL, Name)
@@ -232,9 +233,9 @@ class VPBuilder {
232233 // / Create a new ICmp VPInstruction with predicate \p Pred and operands \p A
233234 // / and \p B.
234235 // / TODO: add createFCmp when needed.
235- VPValue *createICmp (CmpInst::Predicate Pred, VPValue *A, VPValue *B,
236- DebugLoc DL = DebugLoc::getUnknown(),
237- const Twine &Name = "") {
236+ VPInstruction *createICmp (CmpInst::Predicate Pred, VPValue *A, VPValue *B,
237+ DebugLoc DL = DebugLoc::getUnknown(),
238+ const Twine &Name = "") {
238239 assert (Pred >= CmpInst::FIRST_ICMP_PREDICATE &&
239240 Pred <= CmpInst::LAST_ICMP_PREDICATE && " invalid predicate" );
240241 return tryInsertInstruction (
@@ -248,16 +249,16 @@ class VPBuilder {
248249 new VPInstruction (VPInstruction::PtrAdd, {Ptr, Offset},
249250 GEPNoWrapFlags::none (), DL, Name));
250251 }
251- VPValue *createInBoundsPtrAdd (VPValue *Ptr, VPValue *Offset,
252- DebugLoc DL = DebugLoc::getUnknown(),
253- const Twine &Name = "") {
252+ VPInstruction *createInBoundsPtrAdd (VPValue *Ptr, VPValue *Offset,
253+ DebugLoc DL = DebugLoc::getUnknown(),
254+ const Twine &Name = "") {
254255 return tryInsertInstruction (
255256 new VPInstruction (VPInstruction::PtrAdd, {Ptr, Offset},
256257 GEPNoWrapFlags::inBounds (), DL, Name));
257258 }
258259
259- VPInstruction *createScalarPhi (ArrayRef<VPValue *> IncomingValues,
260- DebugLoc DL, const Twine &Name = " " ) {
260+ VPPhi *createScalarPhi (ArrayRef<VPValue *> IncomingValues, DebugLoc DL ,
261+ const Twine &Name = " " ) {
261262 return tryInsertInstruction (new VPPhi (IncomingValues, DL, Name));
262263 }
263264
0 commit comments