@@ -187,33 +187,34 @@ class VPBuilder {
187
187
new VPInstruction (Opcode, Operands, WrapFlags, DL, Name));
188
188
}
189
189
190
- VPValue *createNot (VPValue *Operand, DebugLoc DL = {},
191
- const Twine &Name = " " ) {
190
+ VPInstruction *createNot (VPValue *Operand, DebugLoc DL = {},
191
+ const Twine &Name = " " ) {
192
192
return createInstruction (VPInstruction::Not, {Operand}, DL, Name);
193
193
}
194
194
195
- VPValue *createAnd (VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
196
- const Twine &Name = " " ) {
195
+ VPInstruction *createAnd (VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
196
+ const Twine &Name = " " ) {
197
197
return createInstruction (Instruction::BinaryOps::And, {LHS, RHS}, DL, Name);
198
198
}
199
199
200
- VPValue *createOr (VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
201
- const Twine &Name = " " ) {
200
+ VPInstruction *createOr (VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
201
+ const Twine &Name = " " ) {
202
202
203
203
return tryInsertInstruction (new VPInstruction (
204
204
Instruction::BinaryOps::Or, {LHS, RHS},
205
205
VPRecipeWithIRFlags::DisjointFlagsTy (false ), DL, Name));
206
206
}
207
207
208
- VPValue *createLogicalAnd (VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
209
- const Twine &Name = " " ) {
208
+ VPInstruction *createLogicalAnd (VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
209
+ const Twine &Name = " " ) {
210
210
return tryInsertInstruction (
211
211
new VPInstruction (VPInstruction::LogicalAnd, {LHS, RHS}, DL, Name));
212
212
}
213
213
214
- VPValue *createSelect (VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal,
215
- DebugLoc DL = {}, const Twine &Name = " " ,
216
- std::optional<FastMathFlags> FMFs = std::nullopt) {
214
+ VPInstruction *
215
+ createSelect (VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal,
216
+ DebugLoc DL = {}, const Twine &Name = " " ,
217
+ std::optional<FastMathFlags> FMFs = std::nullopt) {
217
218
auto *Select =
218
219
FMFs ? new VPInstruction (Instruction::Select, {Cond, TrueVal, FalseVal},
219
220
*FMFs, DL, Name)
@@ -225,8 +226,8 @@ class VPBuilder {
225
226
// / Create a new ICmp VPInstruction with predicate \p Pred and operands \p A
226
227
// / and \p B.
227
228
// / TODO: add createFCmp when needed.
228
- VPValue *createICmp (CmpInst::Predicate Pred, VPValue *A, VPValue *B,
229
- DebugLoc DL = {}, const Twine &Name = " " ) {
229
+ VPInstruction *createICmp (CmpInst::Predicate Pred, VPValue *A, VPValue *B,
230
+ DebugLoc DL = {}, const Twine &Name = " " ) {
230
231
assert (Pred >= CmpInst::FIRST_ICMP_PREDICATE &&
231
232
Pred <= CmpInst::LAST_ICMP_PREDICATE && " invalid predicate" );
232
233
return tryInsertInstruction (
@@ -239,15 +240,16 @@ class VPBuilder {
239
240
new VPInstruction (VPInstruction::PtrAdd, {Ptr, Offset},
240
241
GEPNoWrapFlags::none (), DL, Name));
241
242
}
242
- VPValue *createInBoundsPtrAdd (VPValue *Ptr, VPValue *Offset, DebugLoc DL = {},
243
- const Twine &Name = " " ) {
243
+ VPInstruction *createInBoundsPtrAdd (VPValue *Ptr, VPValue *Offset,
244
+ DebugLoc DL = {},
245
+ const Twine &Name = " " ) {
244
246
return tryInsertInstruction (
245
247
new VPInstruction (VPInstruction::PtrAdd, {Ptr, Offset},
246
248
GEPNoWrapFlags::inBounds (), DL, Name));
247
249
}
248
250
249
- VPInstruction *createScalarPhi (ArrayRef<VPValue *> IncomingValues,
250
- DebugLoc DL, const Twine &Name = " " ) {
251
+ VPPhi *createScalarPhi (ArrayRef<VPValue *> IncomingValues, DebugLoc DL ,
252
+ const Twine &Name = " " ) {
251
253
return tryInsertInstruction (new VPPhi (IncomingValues, DL, Name));
252
254
}
253
255
0 commit comments