@@ -1823,6 +1823,7 @@ class LLVM_ABI_FOR_TEST VPWidenGEPRecipe : public VPRecipeWithIRFlags {
18231823 return VarIdx;
18241824 }
18251825
1826+ // / Returns the element type for the first \p I indices of this recipe.
18261827 Type *getIndexedType (unsigned I) const {
18271828 auto *GEP = cast<GetElementPtrInst>(getUnderlyingInstr ());
18281829 SmallVector<Value *, 4 > Ops (GEP->idx_begin (), GEP->idx_begin () + I);
@@ -1919,8 +1920,8 @@ class VPVectorEndPointerRecipe : public VPRecipeWithIRFlags,
19191920#endif
19201921};
19211922
1922- // / A recipe to compute the pointers for widened memory accesses of IndexedTy,
1923- // / with the Stride expressed in units of IndexedTy .
1923+ // / A recipe to compute the pointers for widened memory accesses of
1924+ // / SourceElementTy, with the Stride expressed in units of SourceElementTy .
19241925class VPVectorPointerRecipe : public VPRecipeWithIRFlags ,
19251926 public VPUnrollPartAccessor<2 > {
19261927 Type *SourceElementTy;
@@ -3351,9 +3352,9 @@ struct VPWidenLoadEVLRecipe final : public VPWidenMemoryRecipe, public VPValue {
33513352 }
33523353};
33533354
3354- // / A recipe for strided load operations, using the base address, stride, and an
3355- // / optional mask. This recipe will generate an vp.strided.load intrinsic call
3356- // / to represent memory accesses with a fixed stride.
3355+ // / A recipe for strided load operations, using the base address, stride, VF,
3356+ // / and an optional mask. This recipe will generate a vp.strided.load intrinsic
3357+ // / call to represent memory accesses with a fixed stride.
33573358struct VPWidenStridedLoadRecipe final : public VPWidenMemoryRecipe,
33583359 public VPValue {
33593360 VPWidenStridedLoadRecipe (LoadInst &Load, VPValue *Addr, VPValue *Stride,
@@ -3393,6 +3394,7 @@ struct VPWidenStridedLoadRecipe final : public VPWidenMemoryRecipe,
33933394 bool onlyFirstLaneUsed (const VPValue *Op) const override {
33943395 assert (is_contained (operands (), Op) &&
33953396 " Op must be an operand of the recipe" );
3397+ // All operands except the mask are only used for the first lane.
33963398 return Op == getAddr () || Op == getStride () || Op == getVF ();
33973399 }
33983400};
0 commit comments