File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -592,9 +592,9 @@ static void legalizeAndOptimizeInductions(VPlan &Plan) {
592592 bool HasOnlyVectorVFs = !Plan.hasVF (ElementCount::getFixed (1 ));
593593 VPBuilder Builder (HeaderVPBB, HeaderVPBB->getFirstNonPhi ());
594594 for (VPRecipeBase &Phi : HeaderVPBB->phis ()) {
595- auto *PhiR = dyn_cast<VPHeaderPHIRecipe >(&Phi);
595+ auto *PhiR = dyn_cast<VPWidenInductionRecipe >(&Phi);
596596 if (!PhiR)
597- break ;
597+ continue ;
598598
599599 // Check if any uniform VPReplicateRecipes using the phi recipe are used by
600600 // ExtractFromEnd. Those must be replaced by a regular VPReplicateRecipe to
@@ -641,9 +641,7 @@ static void legalizeAndOptimizeInductions(VPlan &Plan) {
641641
642642 // Replace widened induction with scalar steps for users that only use
643643 // scalars.
644- auto *WideIV = dyn_cast<VPWidenIntOrFpInductionRecipe>(&Phi);
645- if (!WideIV)
646- continue ;
644+ auto *WideIV = cast<VPWidenIntOrFpInductionRecipe>(&Phi);
647645 if (HasOnlyVectorVFs && none_of (WideIV->users (), [WideIV](VPUser *U) {
648646 return U->usesScalars (WideIV);
649647 }))
You can’t perform that action at this time.
0 commit comments