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) {
592
592
bool HasOnlyVectorVFs = !Plan.hasVF (ElementCount::getFixed (1 ));
593
593
VPBuilder Builder (HeaderVPBB, HeaderVPBB->getFirstNonPhi ());
594
594
for (VPRecipeBase &Phi : HeaderVPBB->phis ()) {
595
- auto *PhiR = dyn_cast<VPHeaderPHIRecipe >(&Phi);
595
+ auto *PhiR = dyn_cast<VPWidenInductionRecipe >(&Phi);
596
596
if (!PhiR)
597
- break ;
597
+ continue ;
598
598
599
599
// Check if any uniform VPReplicateRecipes using the phi recipe are used by
600
600
// ExtractFromEnd. Those must be replaced by a regular VPReplicateRecipe to
@@ -641,9 +641,7 @@ static void legalizeAndOptimizeInductions(VPlan &Plan) {
641
641
642
642
// Replace widened induction with scalar steps for users that only use
643
643
// scalars.
644
- auto *WideIV = dyn_cast<VPWidenIntOrFpInductionRecipe>(&Phi);
645
- if (!WideIV)
646
- continue ;
644
+ auto *WideIV = cast<VPWidenIntOrFpInductionRecipe>(&Phi);
647
645
if (HasOnlyVectorVFs && none_of (WideIV->users (), [WideIV](VPUser *U) {
648
646
return U->usesScalars (WideIV);
649
647
}))
You can’t perform that action at this time.
0 commit comments