Skip to content

Commit 3ca3643

Browse files
committed
Add instructions in reverse order, so it's processed in order. This matches InstCombine
1 parent 4e05ab9 commit 3ca3643

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
@@ -1002,7 +1002,7 @@ void VPlanTransforms::simplifyRecipes(VPlan &Plan, Type &CanonicalIVTy) {
10021002
VPTypeAnalysis TypeInfo(&CanonicalIVTy);
10031003
SetVector<VPRecipeBase *> Worklist;
10041004
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(RPOT))
1005-
for (VPRecipeBase &R : make_early_inc_range(*VPBB))
1005+
for (VPRecipeBase &R : reverse(*VPBB))
10061006
Worklist.insert(&R);
10071007

10081008
while (!Worklist.empty()) {

0 commit comments

Comments
 (0)