@@ -165,7 +165,8 @@ class VPBuilder {
165
165
return createInstruction (Opcode, Operands, DL, Name);
166
166
}
167
167
VPInstruction *createNaryOp (unsigned Opcode, ArrayRef<VPValue *> Operands,
168
- const VPIRFlags &Flags, DebugLoc DL = DebugLoc::getUnknown(),
168
+ const VPIRFlags &Flags,
169
+ DebugLoc DL = DebugLoc::getUnknown(),
169
170
const Twine &Name = "") {
170
171
return tryInsertInstruction (
171
172
new VPInstruction (Opcode, Operands, Flags, DL, Name));
@@ -174,15 +175,17 @@ class VPBuilder {
174
175
VPInstruction *createNaryOp (unsigned Opcode,
175
176
std::initializer_list<VPValue *> Operands,
176
177
Type *ResultTy, const VPIRFlags &Flags = {},
177
- DebugLoc DL = DebugLoc::getUnknown(), const Twine &Name = "") {
178
+ DebugLoc DL = DebugLoc::getUnknown(),
179
+ const Twine &Name = "") {
178
180
return tryInsertInstruction (
179
181
new VPInstructionWithType (Opcode, Operands, ResultTy, Flags, DL, Name));
180
182
}
181
183
182
184
VPInstruction *createOverflowingOp (unsigned Opcode,
183
185
std::initializer_list<VPValue *> Operands,
184
186
VPRecipeWithIRFlags::WrapFlagsTy WrapFlags,
185
- DebugLoc DL = DebugLoc::getUnknown(), const Twine &Name = "") {
187
+ DebugLoc DL = DebugLoc::getUnknown(),
188
+ const Twine &Name = "") {
186
189
return tryInsertInstruction (
187
190
new VPInstruction (Opcode, Operands, WrapFlags, DL, Name));
188
191
}
@@ -192,27 +195,31 @@ class VPBuilder {
192
195
return createInstruction (VPInstruction::Not, {Operand}, DL, Name);
193
196
}
194
197
195
- VPValue *createAnd (VPValue *LHS, VPValue *RHS, DebugLoc DL = DebugLoc::getUnknown(),
198
+ VPValue *createAnd (VPValue *LHS, VPValue *RHS,
199
+ DebugLoc DL = DebugLoc::getUnknown(),
196
200
const Twine &Name = "") {
197
201
return createInstruction (Instruction::BinaryOps::And, {LHS, RHS}, DL, Name);
198
202
}
199
203
200
- VPValue *createOr (VPValue *LHS, VPValue *RHS, DebugLoc DL = DebugLoc::getUnknown(),
204
+ VPValue *createOr (VPValue *LHS, VPValue *RHS,
205
+ DebugLoc DL = DebugLoc::getUnknown(),
201
206
const Twine &Name = "") {
202
207
203
208
return tryInsertInstruction (new VPInstruction (
204
209
Instruction::BinaryOps::Or, {LHS, RHS},
205
210
VPRecipeWithIRFlags::DisjointFlagsTy (false ), DL, Name));
206
211
}
207
212
208
- VPValue *createLogicalAnd (VPValue *LHS, VPValue *RHS, DebugLoc DL = DebugLoc::getUnknown(),
213
+ VPValue *createLogicalAnd (VPValue *LHS, VPValue *RHS,
214
+ DebugLoc DL = DebugLoc::getUnknown(),
209
215
const Twine &Name = "") {
210
216
return tryInsertInstruction (
211
217
new VPInstruction (VPInstruction::LogicalAnd, {LHS, RHS}, DL, Name));
212
218
}
213
219
214
220
VPValue *createSelect (VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal,
215
- DebugLoc DL = DebugLoc::getUnknown(), const Twine &Name = "",
221
+ DebugLoc DL = DebugLoc::getUnknown(),
222
+ const Twine &Name = "",
216
223
std::optional<FastMathFlags> FMFs = std::nullopt) {
217
224
auto *Select =
218
225
FMFs ? new VPInstruction (Instruction::Select, {Cond, TrueVal, FalseVal},
@@ -226,20 +233,23 @@ class VPBuilder {
226
233
// / and \p B.
227
234
// / TODO: add createFCmp when needed.
228
235
VPValue *createICmp (CmpInst::Predicate Pred, VPValue *A, VPValue *B,
229
- DebugLoc DL = DebugLoc::getUnknown(), const Twine &Name = "") {
236
+ DebugLoc DL = DebugLoc::getUnknown(),
237
+ const Twine &Name = "") {
230
238
assert (Pred >= CmpInst::FIRST_ICMP_PREDICATE &&
231
239
Pred <= CmpInst::LAST_ICMP_PREDICATE && " invalid predicate" );
232
240
return tryInsertInstruction (
233
241
new VPInstruction (Instruction::ICmp, {A, B}, Pred, DL, Name));
234
242
}
235
243
236
- VPInstruction *createPtrAdd (VPValue *Ptr, VPValue *Offset, DebugLoc DL = DebugLoc::getUnknown(),
244
+ VPInstruction *createPtrAdd (VPValue *Ptr, VPValue *Offset,
245
+ DebugLoc DL = DebugLoc::getUnknown(),
237
246
const Twine &Name = "") {
238
247
return tryInsertInstruction (
239
248
new VPInstruction (VPInstruction::PtrAdd, {Ptr, Offset},
240
249
GEPNoWrapFlags::none (), DL, Name));
241
250
}
242
- VPValue *createInBoundsPtrAdd (VPValue *Ptr, VPValue *Offset, DebugLoc DL = DebugLoc::getUnknown(),
251
+ VPValue *createInBoundsPtrAdd (VPValue *Ptr, VPValue *Offset,
252
+ DebugLoc DL = DebugLoc::getUnknown(),
243
253
const Twine &Name = "") {
244
254
return tryInsertInstruction (
245
255
new VPInstruction (VPInstruction::PtrAdd, {Ptr, Offset},
0 commit comments