@@ -167,7 +167,7 @@ class VPBuilder {
167167 DebugLoc DL = DebugLoc::getUnknown(),
168168 const Twine &Name = "") {
169169 return tryInsertInstruction (
170- new VPInstruction (Opcode, Operands, Flags, DL, Name));
170+ new VPInstruction (Opcode, Operands, Flags, {}, DL, Name));
171171 }
172172
173173 VPInstruction *createNaryOp (unsigned Opcode, ArrayRef<VPValue *> Operands,
@@ -184,7 +184,7 @@ class VPBuilder {
184184 DebugLoc DL = DebugLoc::getUnknown(),
185185 const Twine &Name = "") {
186186 return tryInsertInstruction (
187- new VPInstruction (Opcode, Operands, WrapFlags, DL, Name));
187+ new VPInstruction (Opcode, Operands, WrapFlags, {}, DL, Name));
188188 }
189189
190190 VPInstruction *createNot (VPValue *Operand,
@@ -205,7 +205,7 @@ class VPBuilder {
205205
206206 return tryInsertInstruction (new VPInstruction (
207207 Instruction::BinaryOps::Or, {LHS, RHS},
208- VPRecipeWithIRFlags::DisjointFlagsTy (false ), DL, Name));
208+ VPRecipeWithIRFlags::DisjointFlagsTy (false ), {}, DL, Name));
209209 }
210210
211211 VPInstruction *createLogicalAnd (VPValue *LHS, VPValue *RHS,
@@ -221,7 +221,7 @@ class VPBuilder {
221221 std::optional<FastMathFlags> FMFs = std::nullopt) {
222222 auto *Select =
223223 FMFs ? new VPInstruction (Instruction::Select, {Cond, TrueVal, FalseVal},
224- *FMFs, DL, Name)
224+ *FMFs, {}, DL, Name)
225225 : new VPInstruction (Instruction::Select, {Cond, TrueVal, FalseVal},
226226 DL, Name);
227227 return tryInsertInstruction (Select);
@@ -235,7 +235,7 @@ class VPBuilder {
235235 assert (Pred >= CmpInst::FIRST_ICMP_PREDICATE &&
236236 Pred <= CmpInst::LAST_ICMP_PREDICATE && " invalid predicate" );
237237 return tryInsertInstruction (
238- new VPInstruction (Instruction::ICmp, {A, B}, Pred, DL, Name));
238+ new VPInstruction (Instruction::ICmp, {A, B}, Pred, {}, DL, Name));
239239 }
240240
241241 // / Create a new FCmp VPInstruction with predicate \p Pred and operands \p A
@@ -246,31 +246,31 @@ class VPBuilder {
246246 assert (Pred >= CmpInst::FIRST_FCMP_PREDICATE &&
247247 Pred <= CmpInst::LAST_FCMP_PREDICATE && " invalid predicate" );
248248 return tryInsertInstruction (
249- new VPInstruction (Instruction::FCmp, {A, B}, Pred, DL, Name));
249+ new VPInstruction (Instruction::FCmp, {A, B}, Pred, {}, DL, Name));
250250 }
251251
252252 VPInstruction *createPtrAdd (VPValue *Ptr, VPValue *Offset,
253253 DebugLoc DL = DebugLoc::getUnknown(),
254254 const Twine &Name = "") {
255255 return tryInsertInstruction (
256256 new VPInstruction (VPInstruction::PtrAdd, {Ptr, Offset},
257- GEPNoWrapFlags::none (), DL, Name));
257+ GEPNoWrapFlags::none (), {}, DL, Name));
258258 }
259259
260260 VPInstruction *createNoWrapPtrAdd (VPValue *Ptr, VPValue *Offset,
261261 GEPNoWrapFlags GEPFlags,
262262 DebugLoc DL = DebugLoc::getUnknown(),
263263 const Twine &Name = "") {
264264 return tryInsertInstruction (new VPInstruction (
265- VPInstruction::PtrAdd, {Ptr, Offset}, GEPFlags, DL, Name));
265+ VPInstruction::PtrAdd, {Ptr, Offset}, GEPFlags, {}, DL, Name));
266266 }
267267
268268 VPInstruction *createWidePtrAdd (VPValue *Ptr, VPValue *Offset,
269269 DebugLoc DL = DebugLoc::getUnknown(),
270270 const Twine &Name = "") {
271271 return tryInsertInstruction (
272272 new VPInstruction (VPInstruction::WidePtrAdd, {Ptr, Offset},
273- GEPNoWrapFlags::none (), DL, Name));
273+ GEPNoWrapFlags::none (), {}, DL, Name));
274274 }
275275
276276 VPPhi *createScalarPhi (ArrayRef<VPValue *> IncomingValues, DebugLoc DL,
@@ -303,9 +303,11 @@ class VPBuilder {
303303 }
304304
305305 VPInstruction *createScalarCast (Instruction::CastOps Opcode, VPValue *Op,
306- Type *ResultTy, DebugLoc DL) {
306+ Type *ResultTy, DebugLoc DL,
307+ const VPIRFlags &Flags = {},
308+ const VPIRMetadata &Metadata = {}) {
307309 return tryInsertInstruction (
308- new VPInstructionWithType (Opcode, Op, ResultTy, {}, DL ));
310+ new VPInstructionWithType (Opcode, Op, ResultTy, DL, Flags, Metadata ));
309311 }
310312
311313 VPValue *createScalarZExtOrTrunc (VPValue *Op, Type *ResultTy, Type *SrcTy,
0 commit comments