[llvm] [VPlan] Use pointer to member 0 as VPInterleaveRecipe's pointer arg. (PR #106431)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 12:24:47 PDT 2024


================
@@ -1330,6 +1330,13 @@ class VPInstruction : public VPRecipeWithIRFlags {
     assert(Opcode == Instruction::Or && "only OR opcodes can be disjoint");
   }
 
+  VPInstruction(VPValue *Ptr, VPValue *Offset, bool InBounds, DebugLoc DL = {},
+                const Twine &Name = "")
+      : VPRecipeWithIRFlags(VPDef::VPInstructionSC,
+                            ArrayRef<VPValue *>({Ptr, Offset}),
----------------
fhahn wrote:

The ArrayRef of an initializer list should be valid for the call and it should only be used to iterate over the operands to add in the constructor.

https://github.com/llvm/llvm-project/pull/106431


More information about the llvm-commits mailing list