File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -131,18 +131,17 @@ bool VPlanTransforms::tryToConvertVPInstructionsToVPRecipes(
131131}
132132
133133static bool sinkScalarOperands (VPlan &Plan) {
134+ auto Iter = vp_depth_first_deep (Plan.getEntry ());
134135 bool ScalarVFOnly = Plan.hasScalarVFOnly ();
135136 bool Changed = false ;
136137 // First, collect the operands of all recipes in replicate blocks as seeds for
137138 // sinking.
138139 SetVector<std::pair<VPBasicBlock *, VPSingleDefRecipe *>> WorkList;
139- for (VPRegionBlock *VPR : VPBlockUtils::blocksOnly<VPRegionBlock>(
140- vp_depth_first_deep (Plan.getEntry ()))) {
140+ for (VPRegionBlock *VPR : VPBlockUtils::blocksOnly<VPRegionBlock>(Iter)) {
141141 VPBasicBlock *EntryVPBB = VPR->getEntryBasicBlock ();
142142 if (!VPR->isReplicator () || EntryVPBB->getSuccessors ().size () != 2 )
143143 continue ;
144- VPBasicBlock *VPBB =
145- dyn_cast<VPBasicBlock>(EntryVPBB->getSuccessors ().front ());
144+ VPBasicBlock *VPBB = cast<VPBasicBlock>(EntryVPBB->getSuccessors ().front ());
146145 if (!VPBB || VPBB->getSingleSuccessor () != VPR->getExitingBasicBlock ())
147146 continue ;
148147 for (auto &Recipe : *VPBB) {
You can’t perform that action at this time.
0 commit comments