@@ -3083,16 +3083,15 @@ void VPlanTransforms::materializeBroadcasts(VPlan &Plan) {
30833083}
30843084
30853085// / Returns true if \p V is VPWidenLoadRecipe or VPInterleaveRecipe that can be
3086- // / converted to a narrower recipe. \p V is used by a wide recipe \p WideMember
3087- // / that feeds a store interleave group at index \p Idx, \p WideMember0 is the
3088- // / recipe feeding the same interleave group at index 0. A VPWidenLoadRecipe can
3089- // / be narrowed to an index-independent load if it feeds all wide ops at all
3090- // / indices (\p OpV must be the operand at index \p OpIdx for both the recipe at
3091- // / lane 0, \p WideMember0, and \p WideMember). A VPInterleaveRecipe can be
3092- // / narrowed to a wide load, if \p V is defined at \p Idx of a load interleave
3093- // / group.
3094- static bool canNarrowLoad (VPWidenRecipe *WideMember0, VPWidenRecipe *WideMember,
3095- unsigned OpIdx, VPValue *OpV, unsigned Idx) {
3086+ // / converted to a narrower recipe. \p V is used by a wide recipe that feeds a
3087+ // / store interleave group at index \p Idx, \p WideMember0 is the recipe feeding
3088+ // / the same interleave group at index 0. A VPWidenLoadRecipe can be narrowed to
3089+ // / an index-independent load if it feeds all wide ops at all indices (\p OpV
3090+ // / must be the operand at index \p OpIdx for both the recipe at lane 0, \p
3091+ // / WideMember0). A VPInterleaveRecipe can be narrowed to a wide load, if \p V
3092+ // / is defined at \p Idx of a load interleave group.
3093+ static bool canNarrowLoad (VPWidenRecipe *WideMember0, unsigned OpIdx,
3094+ VPValue *OpV, unsigned Idx) {
30963095 auto *DefR = OpV->getDefiningRecipe ();
30973096 if (!DefR)
30983097 return WideMember0->getOperand (OpIdx) == OpV;
@@ -3240,9 +3239,9 @@ void VPlanTransforms::narrowInterleaveGroups(VPlan &Plan, ElementCount VF,
32403239 R->getNumOperands () > 2 )
32413240 return ;
32423241 if (any_of (enumerate(R->operands ()),
3243- [WideMember0, Idx = I, R ](const auto &P) {
3242+ [WideMember0, Idx = I](const auto &P) {
32443243 const auto &[OpIdx, OpV] = P;
3245- return !canNarrowLoad (WideMember0, R, OpIdx, OpV, Idx);
3244+ return !canNarrowLoad (WideMember0, OpIdx, OpV, Idx);
32463245 }))
32473246 return ;
32483247 }
0 commit comments