@@ -2177,19 +2177,21 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
21772177 assert (all_of (Plan.getVF ().users (),
21782178 IsaPred<VPVectorEndPointerRecipe, VPScalarIVStepsRecipe,
21792179 VPWidenIntOrFpInductionRecipe>) &&
2180- all_of (Plan.getVFxUF ().users (),
2180+ " User of VF that we can't transform to EVL." );
2181+ Plan.getVF ().replaceAllUsesWith (&EVL);
2182+
2183+ assert (all_of (Plan.getVFxUF ().users (),
21812184 [&Plan](VPUser *U) {
2182- // VFxUF users must either be VPWidenPointerInductionRecipe or
2183- // canonical IV increment.
21842185 return match (U, m_c_Binary<Instruction::Add>(
21852186 m_Specific (Plan.getCanonicalIV ()),
21862187 m_Specific (&Plan.getVFxUF ()))) ||
21872188 isa<VPWidenPointerInductionRecipe>(U);
21882189 }) &&
2189- " User of VF that we can't transform to EVL. " );
2190- Plan. getVF (). replaceAllUsesWith (&EVL );
2190+ " Only users of VFxUF should be VPWidenPointerInductionRecipe and the "
2191+ " increment of the canonical induction. " );
21912192 Plan.getVFxUF ().replaceUsesWithIf (&EVL, [](VPUser &U, unsigned Idx) {
2192- // Don't replace the canonical IV increment.
2193+ // Only replace uses in VPWidenPointerInductionRecipe; The increment of the
2194+ // canonical induction must not be updated.
21932195 return isa<VPWidenPointerInductionRecipe>(U);
21942196 });
21952197
0 commit comments