Skip to content

Commit 9cf2368

Browse files
committed
Add instructions in reverse order, so it's processed in order. This matches InstCombine
1 parent f5c591d commit 9cf2368

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ void VPlanTransforms::simplifyRecipes(VPlan &Plan, Type &CanonicalIVTy) {
10051005
VPTypeAnalysis TypeInfo(&CanonicalIVTy);
10061006
SetVector<VPRecipeBase *> Worklist;
10071007
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(RPOT))
1008-
for (VPRecipeBase &R : make_early_inc_range(*VPBB))
1008+
for (VPRecipeBase &R : reverse(*VPBB))
10091009
Worklist.insert(&R);
10101010

10111011
while (!Worklist.empty()) {

0 commit comments

Comments
 (0)