[llvm] b9808e5 - [LoopUnroll] Fold add chains during unrolling

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 5 00:54:37 PDT 2023


Author: Nikita Popov
Date: 2023-07-05T09:54:28+02:00
New Revision: b9808e5660f5fe9e7414c0c0b93acd899235471c

URL: https://github.com/llvm/llvm-project/commit/b9808e5660f5fe9e7414c0c0b93acd899235471c
DIFF: https://github.com/llvm/llvm-project/commit/b9808e5660f5fe9e7414c0c0b93acd899235471c.diff

LOG: [LoopUnroll] Fold add chains during unrolling

Loop unrolling tends to produce chains of
`%x1 = add %x0, 1; %x2 = add %x1, 1; ...` with one add per unrolled
iteration. This patch simplifies these adds to `%xN = add %x0, N`
directly during unrolling, rather than waiting for InstCombine to do so.

The motivation for this is that having a single add (rather than
an add chain) on the induction variable makes it a simple recurrence,
which we specially recognize in a number of places. This allows
InstCombine to directly perform folds with that knowledge, instead
of first folding the add chains, and then doing other folds in another
InstCombine iteration.

Due to the reduced number of InstCombine iterations, this also
results in a small compile-time improvement.

Differential Revision: https://reviews.llvm.org/D153540

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/LoopUnroll.cpp
    llvm/test/Analysis/ScalarEvolution/2012-05-29-MulAddRec.ll
    llvm/test/DebugInfo/unrolled-loop-remainder.ll
    llvm/test/Transforms/LoopUnroll/2011-08-08-PhiUpdate.ll
    llvm/test/Transforms/LoopUnroll/AArch64/partial.ll
    llvm/test/Transforms/LoopUnroll/ARM/instr-size-costs.ll
    llvm/test/Transforms/LoopUnroll/ARM/loop-unrolling.ll
    llvm/test/Transforms/LoopUnroll/ARM/multi-blocks.ll
    llvm/test/Transforms/LoopUnroll/PowerPC/p7-unrolling.ll
    llvm/test/Transforms/LoopUnroll/PowerPC/p8-unrolling-legalize-vectors-inseltpoison.ll
    llvm/test/Transforms/LoopUnroll/PowerPC/p8-unrolling-legalize-vectors.ll
    llvm/test/Transforms/LoopUnroll/RISCV/unroll.ll
    llvm/test/Transforms/LoopUnroll/X86/mmx.ll
    llvm/test/Transforms/LoopUnroll/add-folding-overflow.ll
    llvm/test/Transforms/LoopUnroll/full-unroll-keep-first-exit.ll
    llvm/test/Transforms/LoopUnroll/nonlatchcondbr.ll
    llvm/test/Transforms/LoopUnroll/partial-unroll-non-latch-exit.ll
    llvm/test/Transforms/LoopUnroll/partially-unroll-unconditional-latch.ll
    llvm/test/Transforms/LoopUnroll/runtime-exit-phi-scev-invalidation.ll
    llvm/test/Transforms/LoopUnroll/runtime-loop-at-most-two-exits.ll
    llvm/test/Transforms/LoopUnroll/runtime-loop-multiexit-dom-verify.ll
    llvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll
    llvm/test/Transforms/LoopUnroll/runtime-loop5.ll
    llvm/test/Transforms/LoopUnroll/runtime-multiexit-heuristic.ll
    llvm/test/Transforms/LoopUnroll/runtime-small-upperbound.ll
    llvm/test/Transforms/LoopUnroll/runtime-unroll-assume-no-remainder.ll
    llvm/test/Transforms/LoopUnroll/scev-invalidation-lcssa.ll
    llvm/test/Transforms/LoopUnroll/shifted-tripcount.ll
    llvm/test/Transforms/LoopUnroll/tripcount-overflow.ll
    llvm/test/Transforms/LoopUnroll/unroll-header-exiting-with-phis.ll
    llvm/test/Transforms/LoopUnroll/unroll-opt-attribute.ll
    llvm/test/Transforms/LoopUnrollAndJam/dependencies_visit_order.ll
    llvm/test/Transforms/LoopUnrollAndJam/unroll-and-jam.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/LoopUnroll.cpp b/llvm/lib/Transforms/Utils/LoopUnroll.cpp
index 29661cd2b638d1..511dd61308f927 100644
--- a/llvm/lib/Transforms/Utils/LoopUnroll.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUnroll.cpp
@@ -45,6 +45,7 @@
 #include "llvm/IR/IntrinsicInst.h"
 #include "llvm/IR/Metadata.h"
 #include "llvm/IR/Module.h"
+#include "llvm/IR/PatternMatch.h"
 #include "llvm/IR/Use.h"
 #include "llvm/IR/User.h"
 #include "llvm/IR/ValueHandle.h"
@@ -216,6 +217,8 @@ void llvm::simplifyLoopAfterUnroll(Loop *L, bool SimplifyIVs, LoopInfo *LI,
                                    ScalarEvolution *SE, DominatorTree *DT,
                                    AssumptionCache *AC,
                                    const TargetTransformInfo *TTI) {
+  using namespace llvm::PatternMatch;
+
   // Simplify any new induction variables in the partially unrolled loop.
   if (SE && SimplifyIVs) {
     SmallVector<WeakTrackingVH, 16> DeadInsts;
@@ -241,6 +244,30 @@ void llvm::simplifyLoopAfterUnroll(Loop *L, bool SimplifyIVs, LoopInfo *LI,
           Inst.replaceAllUsesWith(V);
       if (isInstructionTriviallyDead(&Inst))
         DeadInsts.emplace_back(&Inst);
+
+      // Fold ((add X, C1), C2) to (add X, C1+C2). This is very common in
+      // unrolled loops, and handling this early allows following code to
+      // identify the IV as a "simple recurrence" without first folding away
+      // a long chain of adds.
+      {
+        Value *X;
+        const APInt *C1, *C2;
+        if (match(&Inst, m_Add(m_Add(m_Value(X), m_APInt(C1)), m_APInt(C2)))) {
+          auto *InnerI = dyn_cast<Instruction>(Inst.getOperand(0));
+          auto *InnerOBO = cast<OverflowingBinaryOperator>(Inst.getOperand(0));
+          bool SignedOverflow;
+          APInt NewC = C1->sadd_ov(*C2, SignedOverflow);
+          Inst.setOperand(0, X);
+          Inst.setOperand(1, ConstantInt::get(Inst.getType(), NewC));
+          Inst.setHasNoUnsignedWrap(Inst.hasNoUnsignedWrap() &&
+                                    InnerOBO->hasNoUnsignedWrap());
+          Inst.setHasNoSignedWrap(Inst.hasNoSignedWrap() &&
+                                  InnerOBO->hasNoSignedWrap() &&
+                                  !SignedOverflow);
+          if (InnerI && isInstructionTriviallyDead(InnerI))
+            DeadInsts.emplace_back(InnerI);
+        }
+      }
     }
     // We can't do recursive deletion until we're done iterating, as we might
     // have a phi which (potentially indirectly) uses instructions later in

diff  --git a/llvm/test/Analysis/ScalarEvolution/2012-05-29-MulAddRec.ll b/llvm/test/Analysis/ScalarEvolution/2012-05-29-MulAddRec.ll
index a41781aeba01b6..1d735d9d3dcccb 100644
--- a/llvm/test/Analysis/ScalarEvolution/2012-05-29-MulAddRec.ll
+++ b/llvm/test/Analysis/ScalarEvolution/2012-05-29-MulAddRec.ll
@@ -18,7 +18,7 @@ declare void @use(i8 %x)
 ; CHECK: br label %for.body
 
 ; CHECK: for.body:
-; CHECK: %inc.9 = add i8 %inc.8, 1
+; CHECK: %inc.9 = add i8 %inc1, 10
 ; CHECK: %0 = add i8 %inc1, 10
 ; CHECK: br label %for.cond
 

diff  --git a/llvm/test/DebugInfo/unrolled-loop-remainder.ll b/llvm/test/DebugInfo/unrolled-loop-remainder.ll
index c4e9796b675716..6a7fe779f3f87a 100644
--- a/llvm/test/DebugInfo/unrolled-loop-remainder.ll
+++ b/llvm/test/DebugInfo/unrolled-loop-remainder.ll
@@ -42,7 +42,7 @@ define i32 @func_c() local_unnamed_addr #0 !dbg !14 {
 ; CHECK-NEXT:    [[TMP7:%.*]] = load i32, ptr [[ARRAYIDX_PROL_1]], align 4, !dbg [[DBG28]], !tbaa [[TBAA20]]
 ; CHECK-NEXT:    [[CONV_PROL_1:%.*]] = sext i32 [[TMP7]] to i64, !dbg [[DBG28]]
 ; CHECK-NEXT:    [[TMP8:%.*]] = inttoptr i64 [[CONV_PROL_1]] to ptr, !dbg [[DBG28]]
-; CHECK-NEXT:    [[ADD_PROL_1:%.*]] = add nsw i32 [[ADD_PROL]], 2, !dbg [[DBG29]]
+; CHECK-NEXT:    [[ADD_PROL_1:%.*]] = add nsw i32 [[DOTPR]], 4, !dbg [[DBG29]]
 ; CHECK-NEXT:    [[PROL_ITER_CMP_1:%.*]] = icmp ne i32 2, [[XTRAITER]], !dbg [[DBG24]]
 ; CHECK-NEXT:    br i1 [[PROL_ITER_CMP_1]], label [[FOR_BODY_PROL_2:%.*]], label [[FOR_BODY_PROL_LOOPEXIT_UNR_LCSSA]], !dbg [[DBG24]]
 ; CHECK:       for.body.prol.2:
@@ -50,7 +50,7 @@ define i32 @func_c() local_unnamed_addr #0 !dbg !14 {
 ; CHECK-NEXT:    [[TMP9:%.*]] = load i32, ptr [[ARRAYIDX_PROL_2]], align 4, !dbg [[DBG28]], !tbaa [[TBAA20]]
 ; CHECK-NEXT:    [[CONV_PROL_2:%.*]] = sext i32 [[TMP9]] to i64, !dbg [[DBG28]]
 ; CHECK-NEXT:    [[TMP10:%.*]] = inttoptr i64 [[CONV_PROL_2]] to ptr, !dbg [[DBG28]]
-; CHECK-NEXT:    [[ADD_PROL_2:%.*]] = add nsw i32 [[ADD_PROL_1]], 2, !dbg [[DBG29]]
+; CHECK-NEXT:    [[ADD_PROL_2:%.*]] = add nsw i32 [[DOTPR]], 6, !dbg [[DBG29]]
 ; CHECK-NEXT:    br label [[FOR_BODY_PROL_LOOPEXIT_UNR_LCSSA]]
 ; CHECK:       for.body.prol.loopexit.unr-lcssa:
 ; CHECK-NEXT:    [[DOTLCSSA_UNR_PH:%.*]] = phi ptr [ [[TMP6]], [[FOR_BODY_PROL]] ], [ [[TMP8]], [[FOR_BODY_PROL_1]] ], [ [[TMP10]], [[FOR_BODY_PROL_2]] ]
@@ -72,22 +72,19 @@ define i32 @func_c() local_unnamed_addr #0 !dbg !14 {
 ; CHECK-NEXT:    [[TMP14:%.*]] = load i32, ptr [[ARRAYIDX]], align 4, !dbg [[DBG28]], !tbaa [[TBAA20]]
 ; CHECK-NEXT:    [[CONV:%.*]] = sext i32 [[TMP14]] to i64, !dbg [[DBG28]]
 ; CHECK-NEXT:    [[TMP15:%.*]] = inttoptr i64 [[CONV]] to ptr, !dbg [[DBG28]]
-; CHECK-NEXT:    [[ADD:%.*]] = add nsw i32 [[TMP13]], 2, !dbg [[DBG29]]
 ; CHECK-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, ptr [[TMP15]], i64 1, !dbg [[DBG28]]
 ; CHECK-NEXT:    [[TMP16:%.*]] = load i32, ptr [[ARRAYIDX_1]], align 4, !dbg [[DBG28]], !tbaa [[TBAA20]]
 ; CHECK-NEXT:    [[CONV_1:%.*]] = sext i32 [[TMP16]] to i64, !dbg [[DBG28]]
 ; CHECK-NEXT:    [[TMP17:%.*]] = inttoptr i64 [[CONV_1]] to ptr, !dbg [[DBG28]]
-; CHECK-NEXT:    [[ADD_1:%.*]] = add nsw i32 [[ADD]], 2, !dbg [[DBG29]]
 ; CHECK-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, ptr [[TMP17]], i64 1, !dbg [[DBG28]]
 ; CHECK-NEXT:    [[TMP18:%.*]] = load i32, ptr [[ARRAYIDX_2]], align 4, !dbg [[DBG28]], !tbaa [[TBAA20]]
 ; CHECK-NEXT:    [[CONV_2:%.*]] = sext i32 [[TMP18]] to i64, !dbg [[DBG28]]
 ; CHECK-NEXT:    [[TMP19:%.*]] = inttoptr i64 [[CONV_2]] to ptr, !dbg [[DBG28]]
-; CHECK-NEXT:    [[ADD_2:%.*]] = add nsw i32 [[ADD_1]], 2, !dbg [[DBG29]]
 ; CHECK-NEXT:    [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, ptr [[TMP19]], i64 1, !dbg [[DBG28]]
 ; CHECK-NEXT:    [[TMP20:%.*]] = load i32, ptr [[ARRAYIDX_3]], align 4, !dbg [[DBG28]], !tbaa [[TBAA20]]
 ; CHECK-NEXT:    [[CONV_3:%.*]] = sext i32 [[TMP20]] to i64, !dbg [[DBG28]]
 ; CHECK-NEXT:    [[TMP21]] = inttoptr i64 [[CONV_3]] to ptr, !dbg [[DBG28]]
-; CHECK-NEXT:    [[ADD_3]] = add nsw i32 [[ADD_2]], 2, !dbg [[DBG29]]
+; CHECK-NEXT:    [[ADD_3]] = add nsw i32 [[TMP13]], 8, !dbg [[DBG29]]
 ; CHECK-NEXT:    [[TOBOOL_3:%.*]] = icmp eq i32 [[ADD_3]], 0, !dbg [[DBG24]]
 ; CHECK-NEXT:    br i1 [[TOBOOL_3]], label [[FOR_COND_FOR_END_CRIT_EDGE_UNR_LCSSA:%.*]], label [[FOR_BODY]], !dbg [[DBG24]], !llvm.loop [[LOOP30:![0-9]+]]
 ; CHECK:       for.cond.for.end_crit_edge.unr-lcssa:

diff  --git a/llvm/test/Transforms/LoopUnroll/2011-08-08-PhiUpdate.ll b/llvm/test/Transforms/LoopUnroll/2011-08-08-PhiUpdate.ll
index d7365d7cf2a3b6..a965bc2ac2d14e 100644
--- a/llvm/test/Transforms/LoopUnroll/2011-08-08-PhiUpdate.ll
+++ b/llvm/test/Transforms/LoopUnroll/2011-08-08-PhiUpdate.ll
@@ -83,7 +83,7 @@ define i32 @test2(ptr nocapture %p, i32 %n) nounwind readonly {
 ; CHECK-NEXT:    [[TMP4:%.*]] = add nsw i32 [[TMP3]], [[TMP2]]
 ; CHECK-NEXT:    br label [[BB1_1:%.*]]
 ; CHECK:       bb1.1:
-; CHECK-NEXT:    [[INDVAR_NEXT_1:%.*]] = add nuw nsw i64 [[INDVAR_NEXT]], 1
+; CHECK-NEXT:    [[INDVAR_NEXT_1:%.*]] = add nuw nsw i64 [[INDVAR]], 2
 ; CHECK-NEXT:    [[EXITCOND_1:%.*]] = icmp ne i64 [[INDVAR_NEXT_1]], [[TMP]]
 ; CHECK-NEXT:    br i1 [[EXITCOND_1]], label [[BB_2:%.*]], label [[BB1_BB2_CRIT_EDGE]]
 ; CHECK:       bb.2:
@@ -92,7 +92,7 @@ define i32 @test2(ptr nocapture %p, i32 %n) nounwind readonly {
 ; CHECK-NEXT:    [[TMP6:%.*]] = add nsw i32 [[TMP5]], [[TMP4]]
 ; CHECK-NEXT:    br label [[BB1_2:%.*]]
 ; CHECK:       bb1.2:
-; CHECK-NEXT:    [[INDVAR_NEXT_2:%.*]] = add nuw nsw i64 [[INDVAR_NEXT_1]], 1
+; CHECK-NEXT:    [[INDVAR_NEXT_2:%.*]] = add nuw nsw i64 [[INDVAR]], 3
 ; CHECK-NEXT:    [[EXITCOND_2:%.*]] = icmp ne i64 [[INDVAR_NEXT_2]], [[TMP]]
 ; CHECK-NEXT:    br i1 [[EXITCOND_2]], label [[BB_3:%.*]], label [[BB1_BB2_CRIT_EDGE]]
 ; CHECK:       bb.3:
@@ -101,7 +101,7 @@ define i32 @test2(ptr nocapture %p, i32 %n) nounwind readonly {
 ; CHECK-NEXT:    [[TMP8]] = add nsw i32 [[TMP7]], [[TMP6]]
 ; CHECK-NEXT:    br label [[BB1_3]]
 ; CHECK:       bb1.3:
-; CHECK-NEXT:    [[INDVAR_NEXT_3]] = add i64 [[INDVAR_NEXT_2]], 1
+; CHECK-NEXT:    [[INDVAR_NEXT_3]] = add i64 [[INDVAR]], 4
 ; CHECK-NEXT:    [[EXITCOND_3:%.*]] = icmp ne i64 [[INDVAR_NEXT_3]], [[TMP]]
 ; CHECK-NEXT:    br i1 [[EXITCOND_3]], label [[BB]], label [[BB1_BB2_CRIT_EDGE]], !llvm.loop [[LOOP2:![0-9]+]]
 ; CHECK:       bb1.bb2_crit_edge:

diff  --git a/llvm/test/Transforms/LoopUnroll/AArch64/partial.ll b/llvm/test/Transforms/LoopUnroll/AArch64/partial.ll
index b753b1858a8ee4..37206b0ebe8d41 100644
--- a/llvm/test/Transforms/LoopUnroll/AArch64/partial.ll
+++ b/llvm/test/Transforms/LoopUnroll/AArch64/partial.ll
@@ -15,14 +15,7 @@ exit:
   ret void
 }
 
-; CHECK:      add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
+; CHECK: add{{.*}}, 8
 ; CHECK-NEXT: icmp
 
 ; Partial unroll 16 times for this loop.
@@ -57,20 +50,5 @@ exit:
 
 
 
-; CHECK:      add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
+; CHECK: add{{.*}}, 16
 ; CHECK-NEXT: icmp

diff  --git a/llvm/test/Transforms/LoopUnroll/ARM/instr-size-costs.ll b/llvm/test/Transforms/LoopUnroll/ARM/instr-size-costs.ll
index ad934e0ef1e04a..e1701ee75ea461 100644
--- a/llvm/test/Transforms/LoopUnroll/ARM/instr-size-costs.ll
+++ b/llvm/test/Transforms/LoopUnroll/ARM/instr-size-costs.ll
@@ -22,7 +22,7 @@ define void @test_i32_add_optsize(ptr %a, ptr %b, ptr %c) #0 {
 ; CHECK-V8-NEXT:    [[RES_1:%.*]] = add i32 [[DATA_A_1]], [[DATA_B_1]]
 ; CHECK-V8-NEXT:    [[ADDR_C_1:%.*]] = getelementptr i32, ptr [[C]], i32 [[COUNT]]
 ; CHECK-V8-NEXT:    store i32 [[RES_1]], ptr [[ADDR_C_1]], align 4
-; CHECK-V8-NEXT:    [[COUNT_1]] = add nuw nsw i32 [[COUNT]], 1
+; CHECK-V8-NEXT:    [[COUNT_1]] = add nuw nsw i32 [[IV]], 2
 ; CHECK-V8-NEXT:    [[END_1:%.*]] = icmp ne i32 [[COUNT_1]], 100
 ; CHECK-V8-NEXT:    br i1 [[END_1]], label [[LOOP]], label [[EXIT:%.*]]
 ; CHECK-V8:       exit:
@@ -69,7 +69,7 @@ define void @test_i32_add_minsize(ptr %a, ptr %b, ptr %c) #1 {
 ; CHECK-V8-NEXT:    [[RES_1:%.*]] = add i32 [[DATA_A_1]], [[DATA_B_1]]
 ; CHECK-V8-NEXT:    [[ADDR_C_1:%.*]] = getelementptr i32, ptr [[C]], i32 [[COUNT]]
 ; CHECK-V8-NEXT:    store i32 [[RES_1]], ptr [[ADDR_C_1]], align 4
-; CHECK-V8-NEXT:    [[COUNT_1]] = add nuw nsw i32 [[COUNT]], 1
+; CHECK-V8-NEXT:    [[COUNT_1]] = add nuw nsw i32 [[IV]], 2
 ; CHECK-V8-NEXT:    [[END_1:%.*]] = icmp ne i32 [[COUNT_1]], 100
 ; CHECK-V8-NEXT:    br i1 [[END_1]], label [[LOOP]], label [[EXIT:%.*]]
 ; CHECK-V8:       exit:
@@ -116,7 +116,7 @@ define void @test_i64_add_optsize(ptr %a, ptr %b, ptr %c) #0 {
 ; CHECK-V8-NEXT:    [[RES_1:%.*]] = add i64 [[DATA_A_1]], [[DATA_B_1]]
 ; CHECK-V8-NEXT:    [[ADDR_C_1:%.*]] = getelementptr i64, ptr [[C]], i32 [[COUNT]]
 ; CHECK-V8-NEXT:    store i64 [[RES_1]], ptr [[ADDR_C_1]], align 4
-; CHECK-V8-NEXT:    [[COUNT_1]] = add nuw nsw i32 [[COUNT]], 1
+; CHECK-V8-NEXT:    [[COUNT_1]] = add nuw nsw i32 [[IV]], 2
 ; CHECK-V8-NEXT:    [[END_1:%.*]] = icmp ne i32 [[COUNT_1]], 100
 ; CHECK-V8-NEXT:    br i1 [[END_1]], label [[LOOP]], label [[EXIT:%.*]]
 ; CHECK-V8:       exit:
@@ -163,7 +163,7 @@ define void @test_i64_add_minsize(ptr %a, ptr %b, ptr %c) #1 {
 ; CHECK-V8-NEXT:    [[RES_1:%.*]] = add i64 [[DATA_A_1]], [[DATA_B_1]]
 ; CHECK-V8-NEXT:    [[ADDR_C_1:%.*]] = getelementptr i64, ptr [[C]], i32 [[COUNT]]
 ; CHECK-V8-NEXT:    store i64 [[RES_1]], ptr [[ADDR_C_1]], align 4
-; CHECK-V8-NEXT:    [[COUNT_1]] = add nuw nsw i32 [[COUNT]], 1
+; CHECK-V8-NEXT:    [[COUNT_1]] = add nuw nsw i32 [[IV]], 2
 ; CHECK-V8-NEXT:    [[END_1:%.*]] = icmp ne i32 [[COUNT_1]], 100
 ; CHECK-V8-NEXT:    br i1 [[END_1]], label [[LOOP]], label [[EXIT:%.*]]
 ; CHECK-V8:       exit:
@@ -215,7 +215,7 @@ define i32 @test_i32_select_optsize(ptr %a, ptr %b, ptr %c) #0 {
 ; CHECK-V8-NEXT:    [[ACC_NEXT_1]] = add i32 [[UMAX_1]], [[ACC_NEXT]]
 ; CHECK-V8-NEXT:    [[ADDR_C_1:%.*]] = getelementptr i32, ptr [[C]], i32 [[COUNT]]
 ; CHECK-V8-NEXT:    store i32 [[UMAX_1]], ptr [[ADDR_C_1]], align 4
-; CHECK-V8-NEXT:    [[COUNT_1]] = add nuw nsw i32 [[COUNT]], 1
+; CHECK-V8-NEXT:    [[COUNT_1]] = add nuw nsw i32 [[IV]], 2
 ; CHECK-V8-NEXT:    [[END_1:%.*]] = icmp ne i32 [[COUNT_1]], 100
 ; CHECK-V8-NEXT:    br i1 [[END_1]], label [[LOOP]], label [[EXIT:%.*]]
 ; CHECK-V8:       exit:
@@ -271,7 +271,7 @@ define i32 @test_i32_select_minsize(ptr %a, ptr %b, ptr %c) #1 {
 ; CHECK-V8-NEXT:    [[ACC_NEXT_1]] = add i32 [[UMAX_1]], [[ACC_NEXT]]
 ; CHECK-V8-NEXT:    [[ADDR_C_1:%.*]] = getelementptr i32, ptr [[C]], i32 [[COUNT]]
 ; CHECK-V8-NEXT:    store i32 [[UMAX_1]], ptr [[ADDR_C_1]], align 4
-; CHECK-V8-NEXT:    [[COUNT_1]] = add nuw nsw i32 [[COUNT]], 1
+; CHECK-V8-NEXT:    [[COUNT_1]] = add nuw nsw i32 [[IV]], 2
 ; CHECK-V8-NEXT:    [[END_1:%.*]] = icmp ne i32 [[COUNT_1]], 100
 ; CHECK-V8-NEXT:    br i1 [[END_1]], label [[LOOP]], label [[EXIT:%.*]]
 ; CHECK-V8:       exit:

diff  --git a/llvm/test/Transforms/LoopUnroll/ARM/loop-unrolling.ll b/llvm/test/Transforms/LoopUnroll/ARM/loop-unrolling.ll
index dab06b92d3dea8..c00f744ac3ddf9 100644
--- a/llvm/test/Transforms/LoopUnroll/ARM/loop-unrolling.ll
+++ b/llvm/test/Transforms/LoopUnroll/ARM/loop-unrolling.ll
@@ -15,27 +15,27 @@ for.body:
 
 ; CHECK-NOUNROLL: [[IV0:%[a-z.0-9]+]] = phi i32 [ 0, %entry ], [ [[IV2:%[a-z.0-9]+]], %for.body ]
 ; CHECK-NOUNROLL: [[IV1:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 1
-; CHECK-NOUNROLL: [[IV2]] = add nuw nsw i32 [[IV1]], 1
+; CHECK-NOUNROLL: [[IV2]] = add nuw nsw i32 [[IV0]], 2
 ; CHECK-NOUNROLL: [[CMP:%[a-z.0-9]+]] = icmp eq i32 [[IV2]], 1024
 ; CHECK-NOUNROLL: br i1 [[CMP]], label [[END:%[a-z.]+]], label %for.body
 
 ; CHECK-UNROLL: [[IV0:%[a-z.0-9]+]] = phi i32 [ 0, %entry ], [ [[IV16:%[a-z.0-9]+]], %for.body ]
 ; CHECK-UNROLL: [[IV1:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 1
-; CHECK-UNROLL: [[IV2:%[a-z.0-9]+]] = add nuw nsw i32 [[IV1]], 1
-; CHECK-UNROLL: [[IV3:%[a-z.0-9]+]] = add nuw nsw i32 [[IV2]], 1
-; CHECK-UNROLL: [[IV4:%[a-z.0-9]+]] = add nuw nsw i32 [[IV3]], 1
-; CHECK-UNROLL: [[IV5:%[a-z.0-9]+]] = add nuw nsw i32 [[IV4]], 1
-; CHECK-UNROLL: [[IV6:%[a-z.0-9]+]] = add nuw nsw i32 [[IV5]], 1
-; CHECK-UNROLL: [[IV7:%[a-z.0-9]+]] = add nuw nsw i32 [[IV6]], 1
-; CHECK-UNROLL: [[IV8:%[a-z.0-9]+]] = add nuw nsw i32 [[IV7]], 1
-; CHECK-UNROLL: [[IV9:%[a-z.0-9]+]] = add nuw nsw i32 [[IV8]], 1
-; CHECK-UNROLL: [[IV10:%[a-z.0-9]+]] = add nuw nsw i32 [[IV9]], 1
-; CHECK-UNROLL: [[IV11:%[a-z.0-9]+]] = add nuw nsw i32 [[IV10]], 1
-; CHECK-UNROLL: [[IV12:%[a-z.0-9]+]] = add nuw nsw i32 [[IV11]], 1
-; CHECK-UNROLL: [[IV13:%[a-z.0-9]+]] = add nuw nsw i32 [[IV12]], 1
-; CHECK-UNROLL: [[IV14:%[a-z.0-9]+]] = add nuw nsw i32 [[IV13]], 1
-; CHECK-UNROLL: [[IV15:%[a-z.0-9]+]] = add nuw nsw i32 [[IV14]], 1
-; CHECK-UNROLL: [[IV16]] = add nuw nsw i32 [[IV15]], 1
+; CHECK-UNROLL: [[IV2:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 2
+; CHECK-UNROLL: [[IV3:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 3
+; CHECK-UNROLL: [[IV4:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 4
+; CHECK-UNROLL: [[IV5:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 5
+; CHECK-UNROLL: [[IV6:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 6
+; CHECK-UNROLL: [[IV7:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 7
+; CHECK-UNROLL: [[IV8:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 8
+; CHECK-UNROLL: [[IV9:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 9
+; CHECK-UNROLL: [[IV10:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 10
+; CHECK-UNROLL: [[IV11:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 11
+; CHECK-UNROLL: [[IV12:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 12
+; CHECK-UNROLL: [[IV13:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 13
+; CHECK-UNROLL: [[IV14:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 14
+; CHECK-UNROLL: [[IV15:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 15
+; CHECK-UNROLL: [[IV16]] = add nuw nsw i32 [[IV0]], 16
 ; CHECK-UNROLL: [[CMP:%[a-z.0-9]+]] = icmp eq i32 [[IV16]], 1024
 ; CHECK-UNROLL: br i1 [[CMP]], label [[END:%[a-z.]+]], label %for.body
 
@@ -65,14 +65,14 @@ entry:
 for.body:
 ; CHECK-NOUNROLL: [[IV0:%[a-z.0-9]+]] = phi i32 [ 0, [[PRE:%[a-z.0-9]+]] ], [ [[IV2:%[a-z.0-9]+]], %for.body ]
 ; CHECK-NOUNROLL: [[IV1:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 1
-; CHECK-NOUNROLL: [[IV2]] = add nuw i32 [[IV1]], 1
+; CHECK-NOUNROLL: [[IV2]] = add nuw i32 [[IV0]], 2
 ; CHECK-NOUNROLL: br
 
 ; CHECK-UNROLL: [[IV0:%[a-z.0-9]+]] = phi i32 [ 0, [[PRE:%[a-z.0-9]+]] ], [ [[IV4:%[a-z.0-9]+]], %for.body ]
 ; CHECK-UNROLL: [[IV1:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 1
-; CHECK-UNROLL: [[IV2:%[a-z.0-9]+]] = add nuw nsw i32 [[IV1]], 1
-; CHECK-UNROLL: [[IV3:%[a-z.0-9]+]] = add nuw nsw i32 [[IV2]], 1
-; CHECK-UNROLL: [[IV4]] = add nuw i32 [[IV3]], 1
+; CHECK-UNROLL: [[IV2:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 2
+; CHECK-UNROLL: [[IV3:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 3
+; CHECK-UNROLL: [[IV4]] = add nuw i32 [[IV0]], 4
 ; CHECK-UNROLL: br
 
 ; CHECK-UNROLL: for.body.epil:
@@ -125,9 +125,9 @@ for.body4:
 ; CHECK-UNROLL: for.body4.epil.2:
 ; CHECK-UNROLL: [[IV0:%[a-z.0-9]+]] = phi i32 [ 0, [[PRE:%[a-z0-9.]+]] ], [ [[IV4:%[a-z.0-9]+]], %for.body4 ]
 ; CHECK-UNROLL: [[IV1:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 1
-; CHECK-UNROLL: [[IV2:%[a-z.0-9]+]] = add nuw nsw i32 [[IV1]], 1
-; CHECK-UNROLL: [[IV3:%[a-z.0-9]+]] = add nuw nsw i32 [[IV2]], 1
-; CHECK-UNROLL: [[IV4]] = add nuw i32 [[IV3]], 1
+; CHECK-UNROLL: [[IV2:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 2
+; CHECK-UNROLL: [[IV3:%[a-z.0-9]+]] = add nuw nsw i32 [[IV0]], 3
+; CHECK-UNROLL: [[IV4]] = add nuw i32 [[IV0]], 4
 ; CHECK-UNROLL: br
 
   %w.024 = phi i32 [ 0, %for.body4.lr.ph ], [ %inc, %for.body4 ]

diff  --git a/llvm/test/Transforms/LoopUnroll/ARM/multi-blocks.ll b/llvm/test/Transforms/LoopUnroll/ARM/multi-blocks.ll
index 757a3d9a79f513..f988c153b8bc71 100644
--- a/llvm/test/Transforms/LoopUnroll/ARM/multi-blocks.ll
+++ b/llvm/test/Transforms/LoopUnroll/ARM/multi-blocks.ll
@@ -55,7 +55,7 @@ define void @test_three_blocks(ptr nocapture %Output, ptr nocapture readonly %Co
 ; CHECK-NEXT:    br label [[FOR_INC_EPIL_1]]
 ; CHECK:       for.inc.epil.1:
 ; CHECK-NEXT:    [[TEMP_1_EPIL_1:%.*]] = phi i32 [ [[ADD_EPIL_1]], [[IF_THEN_EPIL_1]] ], [ [[TEMP_1_EPIL]], [[FOR_BODY_EPIL_1]] ]
-; CHECK-NEXT:    [[INC_EPIL_1:%.*]] = add nuw i32 [[INC_EPIL]], 1
+; CHECK-NEXT:    [[INC_EPIL_1:%.*]] = add nuw i32 [[J_010_UNR]], 2
 ; CHECK-NEXT:    [[EPIL_ITER_CMP_1:%.*]] = icmp ne i32 2, [[XTRAITER]]
 ; CHECK-NEXT:    br i1 [[EPIL_ITER_CMP_1]], label [[FOR_BODY_EPIL_2:%.*]], label [[FOR_COND_CLEANUP_LOOPEXIT_EPILOG_LCSSA]]
 ; CHECK:       for.body.epil.2:
@@ -97,7 +97,6 @@ define void @test_three_blocks(ptr nocapture %Output, ptr nocapture readonly %Co
 ; CHECK:       for.inc:
 ; CHECK-NEXT:    [[TEMP_1:%.*]] = phi i32 [ [[ADD]], [[IF_THEN]] ], [ [[TEMP_09]], [[FOR_BODY]] ]
 ; CHECK-NEXT:    [[INC:%.*]] = add nuw nsw i32 [[J_010]], 1
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i32 [[NITER]], 1
 ; CHECK-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, ptr [[CONDITION]], i32 [[INC]]
 ; CHECK-NEXT:    [[I_1:%.*]] = load i32, ptr [[ARRAYIDX_1]], align 4
 ; CHECK-NEXT:    [[TOBOOL_1:%.*]] = icmp eq i32 [[I_1]], 0
@@ -109,8 +108,7 @@ define void @test_three_blocks(ptr nocapture %Output, ptr nocapture readonly %Co
 ; CHECK-NEXT:    br label [[FOR_INC_1]]
 ; CHECK:       for.inc.1:
 ; CHECK-NEXT:    [[TEMP_1_1:%.*]] = phi i32 [ [[ADD_1]], [[IF_THEN_1]] ], [ [[TEMP_1]], [[FOR_INC]] ]
-; CHECK-NEXT:    [[INC_1:%.*]] = add nuw nsw i32 [[INC]], 1
-; CHECK-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i32 [[NITER_NEXT]], 1
+; CHECK-NEXT:    [[INC_1:%.*]] = add nuw nsw i32 [[J_010]], 2
 ; CHECK-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, ptr [[CONDITION]], i32 [[INC_1]]
 ; CHECK-NEXT:    [[I_2:%.*]] = load i32, ptr [[ARRAYIDX_2]], align 4
 ; CHECK-NEXT:    [[TOBOOL_2:%.*]] = icmp eq i32 [[I_2]], 0
@@ -122,8 +120,7 @@ define void @test_three_blocks(ptr nocapture %Output, ptr nocapture readonly %Co
 ; CHECK-NEXT:    br label [[FOR_INC_2]]
 ; CHECK:       for.inc.2:
 ; CHECK-NEXT:    [[TEMP_1_2:%.*]] = phi i32 [ [[ADD_2]], [[IF_THEN_2]] ], [ [[TEMP_1_1]], [[FOR_INC_1]] ]
-; CHECK-NEXT:    [[INC_2:%.*]] = add nuw nsw i32 [[INC_1]], 1
-; CHECK-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i32 [[NITER_NEXT_1]], 1
+; CHECK-NEXT:    [[INC_2:%.*]] = add nuw nsw i32 [[J_010]], 3
 ; CHECK-NEXT:    [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, ptr [[CONDITION]], i32 [[INC_2]]
 ; CHECK-NEXT:    [[I_3:%.*]] = load i32, ptr [[ARRAYIDX_3]], align 4
 ; CHECK-NEXT:    [[TOBOOL_3:%.*]] = icmp eq i32 [[I_3]], 0
@@ -135,8 +132,8 @@ define void @test_three_blocks(ptr nocapture %Output, ptr nocapture readonly %Co
 ; CHECK-NEXT:    br label [[FOR_INC_3]]
 ; CHECK:       for.inc.3:
 ; CHECK-NEXT:    [[TEMP_1_3]] = phi i32 [ [[ADD_3]], [[IF_THEN_3]] ], [ [[TEMP_1_2]], [[FOR_INC_2]] ]
-; CHECK-NEXT:    [[INC_3]] = add nuw i32 [[INC_2]], 1
-; CHECK-NEXT:    [[NITER_NEXT_3]] = add i32 [[NITER_NEXT_2]], 1
+; CHECK-NEXT:    [[INC_3]] = add nuw i32 [[J_010]], 4
+; CHECK-NEXT:    [[NITER_NEXT_3]] = add i32 [[NITER]], 4
 ; CHECK-NEXT:    [[NITER_NCMP_3:%.*]] = icmp eq i32 [[NITER_NEXT_3]], [[UNROLL_ITER]]
 ; CHECK-NEXT:    br i1 [[NITER_NCMP_3]], label [[FOR_COND_CLEANUP_LOOPEXIT_UNR_LCSSA_LOOPEXIT]], label [[FOR_BODY]]
 ;
@@ -207,7 +204,7 @@ define void @test_two_exits(ptr nocapture %Output, ptr nocapture readonly %Condi
 ; CHECK-NEXT:    [[TOBOOL_1:%.*]] = icmp eq i32 [[I1_1]], 0
 ; CHECK-NEXT:    [[ADD_1:%.*]] = select i1 [[TOBOOL_1]], i32 0, i32 [[I_1]]
 ; CHECK-NEXT:    [[TEMP_0_ADD_1:%.*]] = add i32 [[ADD_1]], [[TEMP_0_ADD]]
-; CHECK-NEXT:    [[INC_1:%.*]] = add nuw nsw i32 [[INC]], 1
+; CHECK-NEXT:    [[INC_1:%.*]] = add nuw nsw i32 [[J_016]], 2
 ; CHECK-NEXT:    [[CMP_1:%.*]] = icmp ult i32 [[INC_1]], [[MAXJ]]
 ; CHECK-NEXT:    br i1 [[CMP_1]], label [[FOR_BODY_2:%.*]], label [[CLEANUP_LOOPEXIT]]
 ; CHECK:       for.body.2:
@@ -221,7 +218,7 @@ define void @test_two_exits(ptr nocapture %Output, ptr nocapture readonly %Condi
 ; CHECK-NEXT:    [[TOBOOL_2:%.*]] = icmp eq i32 [[I1_2]], 0
 ; CHECK-NEXT:    [[ADD_2:%.*]] = select i1 [[TOBOOL_2]], i32 0, i32 [[I_2]]
 ; CHECK-NEXT:    [[TEMP_0_ADD_2:%.*]] = add i32 [[ADD_2]], [[TEMP_0_ADD_1]]
-; CHECK-NEXT:    [[INC_2:%.*]] = add nuw nsw i32 [[INC_1]], 1
+; CHECK-NEXT:    [[INC_2:%.*]] = add nuw nsw i32 [[J_016]], 3
 ; CHECK-NEXT:    [[CMP_2:%.*]] = icmp ult i32 [[INC_2]], [[MAXJ]]
 ; CHECK-NEXT:    br i1 [[CMP_2]], label [[FOR_BODY_3:%.*]], label [[CLEANUP_LOOPEXIT]]
 ; CHECK:       for.body.3:
@@ -235,7 +232,7 @@ define void @test_two_exits(ptr nocapture %Output, ptr nocapture readonly %Condi
 ; CHECK-NEXT:    [[TOBOOL_3:%.*]] = icmp eq i32 [[I1_3]], 0
 ; CHECK-NEXT:    [[ADD_3:%.*]] = select i1 [[TOBOOL_3]], i32 0, i32 [[I_3]]
 ; CHECK-NEXT:    [[TEMP_0_ADD_3]] = add i32 [[ADD_3]], [[TEMP_0_ADD_2]]
-; CHECK-NEXT:    [[INC_3]] = add nuw i32 [[INC_2]], 1
+; CHECK-NEXT:    [[INC_3]] = add nuw i32 [[J_016]], 4
 ; CHECK-NEXT:    [[CMP_3:%.*]] = icmp ult i32 [[INC_3]], [[MAXJ]]
 ; CHECK-NEXT:    br i1 [[CMP_3]], label [[FOR_BODY]], label [[CLEANUP_LOOPEXIT]]
 ; CHECK:       cleanup.loopexit:
@@ -423,7 +420,7 @@ define void @test_four_blocks(ptr nocapture %Output, ptr nocapture readonly %Con
 ; CHECK-NEXT:    br label [[FOR_INC_EPIL_1]]
 ; CHECK:       for.inc.epil.1:
 ; CHECK-NEXT:    [[TEMP_1_EPIL_1:%.*]] = phi i32 [ [[ADD_EPIL_1]], [[IF_THEN_EPIL_1]] ], [ [[SUB13_EPIL_1]], [[IF_ELSE_EPIL_1]] ]
-; CHECK-NEXT:    [[INC_EPIL_1:%.*]] = add nuw i32 [[INC_EPIL]], 1
+; CHECK-NEXT:    [[INC_EPIL_1:%.*]] = add nuw i32 [[J_027_UNR]], 2
 ; CHECK-NEXT:    [[EPIL_ITER_CMP_1:%.*]] = icmp ne i32 2, [[XTRAITER]]
 ; CHECK-NEXT:    br i1 [[EPIL_ITER_CMP_1]], label [[FOR_BODY_EPIL_2:%.*]], label [[FOR_COND_CLEANUP_LOOPEXIT_EPILOG_LCSSA]]
 ; CHECK:       for.body.epil.2:
@@ -486,7 +483,6 @@ define void @test_four_blocks(ptr nocapture %Output, ptr nocapture readonly %Con
 ; CHECK:       for.inc:
 ; CHECK-NEXT:    [[TEMP_1:%.*]] = phi i32 [ [[ADD]], [[IF_THEN]] ], [ [[SUB13]], [[IF_ELSE]] ]
 ; CHECK-NEXT:    [[INC:%.*]] = add nuw nsw i32 [[J_027]], 1
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i32 [[NITER]], 1
 ; CHECK-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, ptr [[CONDITION]], i32 [[INC]]
 ; CHECK-NEXT:    [[I1_1:%.*]] = load i32, ptr [[ARRAYIDX_1]], align 4
 ; CHECK-NEXT:    [[CMP1_1:%.*]] = icmp ugt i32 [[I1_1]], 65535
@@ -508,8 +504,7 @@ define void @test_four_blocks(ptr nocapture %Output, ptr nocapture readonly %Con
 ; CHECK-NEXT:    br label [[FOR_INC_1]]
 ; CHECK:       for.inc.1:
 ; CHECK-NEXT:    [[TEMP_1_1:%.*]] = phi i32 [ [[ADD_1]], [[IF_THEN_1]] ], [ [[SUB13_1]], [[IF_ELSE_1]] ]
-; CHECK-NEXT:    [[INC_1:%.*]] = add nuw nsw i32 [[INC]], 1
-; CHECK-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i32 [[NITER_NEXT]], 1
+; CHECK-NEXT:    [[INC_1:%.*]] = add nuw nsw i32 [[J_027]], 2
 ; CHECK-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, ptr [[CONDITION]], i32 [[INC_1]]
 ; CHECK-NEXT:    [[I1_2:%.*]] = load i32, ptr [[ARRAYIDX_2]], align 4
 ; CHECK-NEXT:    [[CMP1_2:%.*]] = icmp ugt i32 [[I1_2]], 65535
@@ -531,8 +526,7 @@ define void @test_four_blocks(ptr nocapture %Output, ptr nocapture readonly %Con
 ; CHECK-NEXT:    br label [[FOR_INC_2]]
 ; CHECK:       for.inc.2:
 ; CHECK-NEXT:    [[TEMP_1_2:%.*]] = phi i32 [ [[ADD_2]], [[IF_THEN_2]] ], [ [[SUB13_2]], [[IF_ELSE_2]] ]
-; CHECK-NEXT:    [[INC_2:%.*]] = add nuw i32 [[INC_1]], 1
-; CHECK-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i32 [[NITER_NEXT_1]], 1
+; CHECK-NEXT:    [[INC_2:%.*]] = add nuw i32 [[J_027]], 3
 ; CHECK-NEXT:    [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, ptr [[CONDITION]], i32 [[INC_2]]
 ; CHECK-NEXT:    [[I1_3:%.*]] = load i32, ptr [[ARRAYIDX_3]], align 4
 ; CHECK-NEXT:    [[CMP1_3:%.*]] = icmp ugt i32 [[I1_3]], 65535
@@ -554,8 +548,8 @@ define void @test_four_blocks(ptr nocapture %Output, ptr nocapture readonly %Con
 ; CHECK-NEXT:    br label [[FOR_INC_3]]
 ; CHECK:       for.inc.3:
 ; CHECK-NEXT:    [[TEMP_1_3]] = phi i32 [ [[ADD_3]], [[IF_THEN_3]] ], [ [[SUB13_3]], [[IF_ELSE_3]] ]
-; CHECK-NEXT:    [[INC_3]] = add nuw nsw i32 [[INC_2]], 1
-; CHECK-NEXT:    [[NITER_NEXT_3]] = add i32 [[NITER_NEXT_2]], 1
+; CHECK-NEXT:    [[INC_3]] = add nuw i32 [[J_027]], 4
+; CHECK-NEXT:    [[NITER_NEXT_3]] = add i32 [[NITER]], 4
 ; CHECK-NEXT:    [[NITER_NCMP_3:%.*]] = icmp eq i32 [[NITER_NEXT_3]], [[UNROLL_ITER]]
 ; CHECK-NEXT:    br i1 [[NITER_NCMP_3]], label [[FOR_COND_CLEANUP_LOOPEXIT_UNR_LCSSA_LOOPEXIT]], label [[FOR_BODY]]
 ;

diff  --git a/llvm/test/Transforms/LoopUnroll/PowerPC/p7-unrolling.ll b/llvm/test/Transforms/LoopUnroll/PowerPC/p7-unrolling.ll
index e9385eea80e387..f1e5d0f858425c 100644
--- a/llvm/test/Transforms/LoopUnroll/PowerPC/p7-unrolling.ll
+++ b/llvm/test/Transforms/LoopUnroll/PowerPC/p7-unrolling.ll
@@ -14,37 +14,6 @@ exit:
 }
 
 ; CHECK-LABEL: @unroll_default
-; CHECK:      add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
-; CHECK-NEXT: add
+; CHECK: add{{.*}}, 32
 ; CHECK-NEXT: icmp
 

diff  --git a/llvm/test/Transforms/LoopUnroll/PowerPC/p8-unrolling-legalize-vectors-inseltpoison.ll b/llvm/test/Transforms/LoopUnroll/PowerPC/p8-unrolling-legalize-vectors-inseltpoison.ll
index 97f31b60d67025..d0041668e77bde 100644
--- a/llvm/test/Transforms/LoopUnroll/PowerPC/p8-unrolling-legalize-vectors-inseltpoison.ll
+++ b/llvm/test/Transforms/LoopUnroll/PowerPC/p8-unrolling-legalize-vectors-inseltpoison.ll
@@ -40,16 +40,15 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    store <16 x i8> [[TMP7]], ptr [[TMP8]], align 1
 ; CHECK-NEXT:    [[INDEX_NEXT:%.*]] = add nuw nsw i64 [[INDEX]], 16
 ; CHECK-NEXT:    [[VEC_IND_NEXT13:%.*]] = add <16 x i32> [[VEC_IND12]], <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i64 [[NITER]], 1
 ; CHECK-NEXT:    [[TMP9:%.*]] = shl <16 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>, [[VEC_IND_NEXT13]]
 ; CHECK-NEXT:    [[TMP10:%.*]] = and <16 x i32> [[TMP9]], [[BROADCAST_SPLAT]]
 ; CHECK-NEXT:    [[TMP11:%.*]] = icmp eq <16 x i32> [[TMP10]], zeroinitializer
 ; CHECK-NEXT:    [[TMP12:%.*]] = select <16 x i1> [[TMP11]], <16 x i8> <i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48>, <16 x i8> <i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49>
 ; CHECK-NEXT:    [[TMP13:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDEX_NEXT]]
 ; CHECK-NEXT:    store <16 x i8> [[TMP12]], ptr [[TMP13]], align 1
-; CHECK-NEXT:    [[INDEX_NEXT_1]] = add i64 [[INDEX_NEXT]], 16
-; CHECK-NEXT:    [[VEC_IND_NEXT13_1]] = add <16 x i32> [[VEC_IND_NEXT13]], <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
-; CHECK-NEXT:    [[NITER_NEXT_1]] = add i64 [[NITER_NEXT]], 1
+; CHECK-NEXT:    [[INDEX_NEXT_1]] = add i64 [[INDEX]], 32
+; CHECK-NEXT:    [[VEC_IND_NEXT13_1]] = add <16 x i32> [[VEC_IND12]], <i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32>
+; CHECK-NEXT:    [[NITER_NEXT_1]] = add i64 [[NITER]], 2
 ; CHECK-NEXT:    [[NITER_NCMP_1:%.*]] = icmp eq i64 [[NITER_NEXT_1]], [[UNROLL_ITER]]
 ; CHECK-NEXT:    br i1 [[NITER_NCMP_1]], label [[MIDDLE_BLOCK_UNR_LCSSA_LOOPEXIT:%.*]], label [[VECTOR_BODY]]
 ; CHECK:       middle.block.unr-lcssa.loopexit:
@@ -125,7 +124,7 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    [[CONV_1:%.*]] = select i1 [[TOBOOL_1]], i8 48, i8 49
 ; CHECK-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDVARS_IV_NEXT]]
 ; CHECK-NEXT:    store i8 [[CONV_1]], ptr [[ARRAYIDX_1]], align 1
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 2
 ; CHECK-NEXT:    [[TMP26:%.*]] = trunc i64 [[INDVARS_IV_NEXT_1]] to i32
 ; CHECK-NEXT:    [[SHL_2:%.*]] = shl i32 1, [[TMP26]]
 ; CHECK-NEXT:    [[AND_2:%.*]] = and i32 [[SHL_2]], [[X]]
@@ -133,7 +132,7 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    [[CONV_2:%.*]] = select i1 [[TOBOOL_2]], i8 48, i8 49
 ; CHECK-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDVARS_IV_NEXT_1]]
 ; CHECK-NEXT:    store i8 [[CONV_2]], ptr [[ARRAYIDX_2]], align 1
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_1]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 3
 ; CHECK-NEXT:    [[TMP27:%.*]] = trunc i64 [[INDVARS_IV_NEXT_2]] to i32
 ; CHECK-NEXT:    [[SHL_3:%.*]] = shl i32 1, [[TMP27]]
 ; CHECK-NEXT:    [[AND_3:%.*]] = and i32 [[SHL_3]], [[X]]
@@ -141,7 +140,7 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    [[CONV_3:%.*]] = select i1 [[TOBOOL_3]], i8 48, i8 49
 ; CHECK-NEXT:    [[ARRAYIDX_3:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDVARS_IV_NEXT_2]]
 ; CHECK-NEXT:    store i8 [[CONV_3]], ptr [[ARRAYIDX_3]], align 1
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_2]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 4
 ; CHECK-NEXT:    [[TMP28:%.*]] = trunc i64 [[INDVARS_IV_NEXT_3]] to i32
 ; CHECK-NEXT:    [[SHL_4:%.*]] = shl i32 1, [[TMP28]]
 ; CHECK-NEXT:    [[AND_4:%.*]] = and i32 [[SHL_4]], [[X]]
@@ -149,7 +148,7 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    [[CONV_4:%.*]] = select i1 [[TOBOOL_4]], i8 48, i8 49
 ; CHECK-NEXT:    [[ARRAYIDX_4:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDVARS_IV_NEXT_3]]
 ; CHECK-NEXT:    store i8 [[CONV_4]], ptr [[ARRAYIDX_4]], align 1
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_3]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 5
 ; CHECK-NEXT:    [[TMP29:%.*]] = trunc i64 [[INDVARS_IV_NEXT_4]] to i32
 ; CHECK-NEXT:    [[SHL_5:%.*]] = shl i32 1, [[TMP29]]
 ; CHECK-NEXT:    [[AND_5:%.*]] = and i32 [[SHL_5]], [[X]]
@@ -157,7 +156,7 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    [[CONV_5:%.*]] = select i1 [[TOBOOL_5]], i8 48, i8 49
 ; CHECK-NEXT:    [[ARRAYIDX_5:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDVARS_IV_NEXT_4]]
 ; CHECK-NEXT:    store i8 [[CONV_5]], ptr [[ARRAYIDX_5]], align 1
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_4]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 6
 ; CHECK-NEXT:    [[TMP30:%.*]] = trunc i64 [[INDVARS_IV_NEXT_5]] to i32
 ; CHECK-NEXT:    [[SHL_6:%.*]] = shl i32 1, [[TMP30]]
 ; CHECK-NEXT:    [[AND_6:%.*]] = and i32 [[SHL_6]], [[X]]
@@ -165,7 +164,7 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    [[CONV_6:%.*]] = select i1 [[TOBOOL_6]], i8 48, i8 49
 ; CHECK-NEXT:    [[ARRAYIDX_6:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDVARS_IV_NEXT_5]]
 ; CHECK-NEXT:    store i8 [[CONV_6]], ptr [[ARRAYIDX_6]], align 1
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_5]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 7
 ; CHECK-NEXT:    [[TMP31:%.*]] = trunc i64 [[INDVARS_IV_NEXT_6]] to i32
 ; CHECK-NEXT:    [[SHL_7:%.*]] = shl i32 1, [[TMP31]]
 ; CHECK-NEXT:    [[AND_7:%.*]] = and i32 [[SHL_7]], [[X]]
@@ -173,7 +172,7 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    [[CONV_7:%.*]] = select i1 [[TOBOOL_7]], i8 48, i8 49
 ; CHECK-NEXT:    [[ARRAYIDX_7:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDVARS_IV_NEXT_6]]
 ; CHECK-NEXT:    store i8 [[CONV_7]], ptr [[ARRAYIDX_7]], align 1
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_7]] = add nuw nsw i64 [[INDVARS_IV_NEXT_6]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_7]] = add nuw nsw i64 [[INDVARS_IV]], 8
 ; CHECK-NEXT:    [[EXITCOND_7:%.*]] = icmp eq i64 [[INDVARS_IV_NEXT_7]], [[WIDE_TRIP_COUNT]]
 ; CHECK-NEXT:    br i1 [[EXITCOND_7]], label [[FOR_END_LOOPEXIT_UNR_LCSSA:%.*]], label [[FOR_BODY]]
 ; CHECK:       for.end.loopexit.unr-lcssa:

diff  --git a/llvm/test/Transforms/LoopUnroll/PowerPC/p8-unrolling-legalize-vectors.ll b/llvm/test/Transforms/LoopUnroll/PowerPC/p8-unrolling-legalize-vectors.ll
index 8e74063c6d1245..c2a8675f7ebbab 100644
--- a/llvm/test/Transforms/LoopUnroll/PowerPC/p8-unrolling-legalize-vectors.ll
+++ b/llvm/test/Transforms/LoopUnroll/PowerPC/p8-unrolling-legalize-vectors.ll
@@ -40,16 +40,15 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    store <16 x i8> [[TMP7]], ptr [[TMP8]], align 1
 ; CHECK-NEXT:    [[INDEX_NEXT:%.*]] = add nuw nsw i64 [[INDEX]], 16
 ; CHECK-NEXT:    [[VEC_IND_NEXT13:%.*]] = add <16 x i32> [[VEC_IND12]], <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i64 [[NITER]], 1
 ; CHECK-NEXT:    [[TMP9:%.*]] = shl <16 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>, [[VEC_IND_NEXT13]]
 ; CHECK-NEXT:    [[TMP10:%.*]] = and <16 x i32> [[TMP9]], [[BROADCAST_SPLAT]]
 ; CHECK-NEXT:    [[TMP11:%.*]] = icmp eq <16 x i32> [[TMP10]], zeroinitializer
 ; CHECK-NEXT:    [[TMP12:%.*]] = select <16 x i1> [[TMP11]], <16 x i8> <i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48>, <16 x i8> <i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49, i8 49>
 ; CHECK-NEXT:    [[TMP13:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDEX_NEXT]]
 ; CHECK-NEXT:    store <16 x i8> [[TMP12]], ptr [[TMP13]], align 1
-; CHECK-NEXT:    [[INDEX_NEXT_1]] = add i64 [[INDEX_NEXT]], 16
-; CHECK-NEXT:    [[VEC_IND_NEXT13_1]] = add <16 x i32> [[VEC_IND_NEXT13]], <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
-; CHECK-NEXT:    [[NITER_NEXT_1]] = add i64 [[NITER_NEXT]], 1
+; CHECK-NEXT:    [[INDEX_NEXT_1]] = add i64 [[INDEX]], 32
+; CHECK-NEXT:    [[VEC_IND_NEXT13_1]] = add <16 x i32> [[VEC_IND12]], <i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32>
+; CHECK-NEXT:    [[NITER_NEXT_1]] = add i64 [[NITER]], 2
 ; CHECK-NEXT:    [[NITER_NCMP_1:%.*]] = icmp eq i64 [[NITER_NEXT_1]], [[UNROLL_ITER]]
 ; CHECK-NEXT:    br i1 [[NITER_NCMP_1]], label [[MIDDLE_BLOCK_UNR_LCSSA_LOOPEXIT:%.*]], label [[VECTOR_BODY]]
 ; CHECK:       middle.block.unr-lcssa.loopexit:
@@ -125,7 +124,7 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    [[CONV_1:%.*]] = select i1 [[TOBOOL_1]], i8 48, i8 49
 ; CHECK-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDVARS_IV_NEXT]]
 ; CHECK-NEXT:    store i8 [[CONV_1]], ptr [[ARRAYIDX_1]], align 1
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 2
 ; CHECK-NEXT:    [[TMP26:%.*]] = trunc i64 [[INDVARS_IV_NEXT_1]] to i32
 ; CHECK-NEXT:    [[SHL_2:%.*]] = shl i32 1, [[TMP26]]
 ; CHECK-NEXT:    [[AND_2:%.*]] = and i32 [[SHL_2]], [[X]]
@@ -133,7 +132,7 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    [[CONV_2:%.*]] = select i1 [[TOBOOL_2]], i8 48, i8 49
 ; CHECK-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDVARS_IV_NEXT_1]]
 ; CHECK-NEXT:    store i8 [[CONV_2]], ptr [[ARRAYIDX_2]], align 1
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_1]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 3
 ; CHECK-NEXT:    [[TMP27:%.*]] = trunc i64 [[INDVARS_IV_NEXT_2]] to i32
 ; CHECK-NEXT:    [[SHL_3:%.*]] = shl i32 1, [[TMP27]]
 ; CHECK-NEXT:    [[AND_3:%.*]] = and i32 [[SHL_3]], [[X]]
@@ -141,7 +140,7 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    [[CONV_3:%.*]] = select i1 [[TOBOOL_3]], i8 48, i8 49
 ; CHECK-NEXT:    [[ARRAYIDX_3:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDVARS_IV_NEXT_2]]
 ; CHECK-NEXT:    store i8 [[CONV_3]], ptr [[ARRAYIDX_3]], align 1
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_2]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 4
 ; CHECK-NEXT:    [[TMP28:%.*]] = trunc i64 [[INDVARS_IV_NEXT_3]] to i32
 ; CHECK-NEXT:    [[SHL_4:%.*]] = shl i32 1, [[TMP28]]
 ; CHECK-NEXT:    [[AND_4:%.*]] = and i32 [[SHL_4]], [[X]]
@@ -149,7 +148,7 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    [[CONV_4:%.*]] = select i1 [[TOBOOL_4]], i8 48, i8 49
 ; CHECK-NEXT:    [[ARRAYIDX_4:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDVARS_IV_NEXT_3]]
 ; CHECK-NEXT:    store i8 [[CONV_4]], ptr [[ARRAYIDX_4]], align 1
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_3]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 5
 ; CHECK-NEXT:    [[TMP29:%.*]] = trunc i64 [[INDVARS_IV_NEXT_4]] to i32
 ; CHECK-NEXT:    [[SHL_5:%.*]] = shl i32 1, [[TMP29]]
 ; CHECK-NEXT:    [[AND_5:%.*]] = and i32 [[SHL_5]], [[X]]
@@ -157,7 +156,7 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    [[CONV_5:%.*]] = select i1 [[TOBOOL_5]], i8 48, i8 49
 ; CHECK-NEXT:    [[ARRAYIDX_5:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDVARS_IV_NEXT_4]]
 ; CHECK-NEXT:    store i8 [[CONV_5]], ptr [[ARRAYIDX_5]], align 1
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_4]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 6
 ; CHECK-NEXT:    [[TMP30:%.*]] = trunc i64 [[INDVARS_IV_NEXT_5]] to i32
 ; CHECK-NEXT:    [[SHL_6:%.*]] = shl i32 1, [[TMP30]]
 ; CHECK-NEXT:    [[AND_6:%.*]] = and i32 [[SHL_6]], [[X]]
@@ -165,7 +164,7 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    [[CONV_6:%.*]] = select i1 [[TOBOOL_6]], i8 48, i8 49
 ; CHECK-NEXT:    [[ARRAYIDX_6:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDVARS_IV_NEXT_5]]
 ; CHECK-NEXT:    store i8 [[CONV_6]], ptr [[ARRAYIDX_6]], align 1
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_5]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 7
 ; CHECK-NEXT:    [[TMP31:%.*]] = trunc i64 [[INDVARS_IV_NEXT_6]] to i32
 ; CHECK-NEXT:    [[SHL_7:%.*]] = shl i32 1, [[TMP31]]
 ; CHECK-NEXT:    [[AND_7:%.*]] = and i32 [[SHL_7]], [[X]]
@@ -173,7 +172,7 @@ define ptr @f(ptr returned %s, i32 zeroext %x, i32 signext %k) local_unnamed_add
 ; CHECK-NEXT:    [[CONV_7:%.*]] = select i1 [[TOBOOL_7]], i8 48, i8 49
 ; CHECK-NEXT:    [[ARRAYIDX_7:%.*]] = getelementptr inbounds i8, ptr [[S]], i64 [[INDVARS_IV_NEXT_6]]
 ; CHECK-NEXT:    store i8 [[CONV_7]], ptr [[ARRAYIDX_7]], align 1
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_7]] = add nuw nsw i64 [[INDVARS_IV_NEXT_6]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_7]] = add nuw nsw i64 [[INDVARS_IV]], 8
 ; CHECK-NEXT:    [[EXITCOND_7:%.*]] = icmp eq i64 [[INDVARS_IV_NEXT_7]], [[WIDE_TRIP_COUNT]]
 ; CHECK-NEXT:    br i1 [[EXITCOND_7]], label [[FOR_END_LOOPEXIT_UNR_LCSSA:%.*]], label [[FOR_BODY]]
 ; CHECK:       for.end.loopexit.unr-lcssa:

diff  --git a/llvm/test/Transforms/LoopUnroll/RISCV/unroll.ll b/llvm/test/Transforms/LoopUnroll/RISCV/unroll.ll
index 015c4e4cfb698d..18d22f52525a53 100644
--- a/llvm/test/Transforms/LoopUnroll/RISCV/unroll.ll
+++ b/llvm/test/Transforms/LoopUnroll/RISCV/unroll.ll
@@ -22,7 +22,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP3:%.*]] = load float, ptr [[ARRAYIDX2_1]], align 4
 ; CHECK-NEXT:    [[ADD_1:%.*]] = fadd fast float [[MUL_1]], [[TMP3]]
 ; CHECK-NEXT:    store float [[ADD_1]], ptr [[ARRAYIDX2_1]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 2
 ; CHECK-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr inbounds float, ptr [[X]], i64 [[INDVARS_IV_NEXT_1]]
 ; CHECK-NEXT:    [[TMP4:%.*]] = load float, ptr [[ARRAYIDX_2]], align 4
 ; CHECK-NEXT:    [[MUL_2:%.*]] = fmul fast float [[TMP4]], [[A]]
@@ -30,7 +30,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP5:%.*]] = load float, ptr [[ARRAYIDX2_2]], align 4
 ; CHECK-NEXT:    [[ADD_2:%.*]] = fadd fast float [[MUL_2]], [[TMP5]]
 ; CHECK-NEXT:    store float [[ADD_2]], ptr [[ARRAYIDX2_2]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_1]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 3
 ; CHECK-NEXT:    [[ARRAYIDX_3:%.*]] = getelementptr inbounds float, ptr [[X]], i64 [[INDVARS_IV_NEXT_2]]
 ; CHECK-NEXT:    [[TMP6:%.*]] = load float, ptr [[ARRAYIDX_3]], align 4
 ; CHECK-NEXT:    [[MUL_3:%.*]] = fmul fast float [[TMP6]], [[A]]
@@ -38,7 +38,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP7:%.*]] = load float, ptr [[ARRAYIDX2_3]], align 4
 ; CHECK-NEXT:    [[ADD_3:%.*]] = fadd fast float [[MUL_3]], [[TMP7]]
 ; CHECK-NEXT:    store float [[ADD_3]], ptr [[ARRAYIDX2_3]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_2]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 4
 ; CHECK-NEXT:    [[ARRAYIDX_4:%.*]] = getelementptr inbounds float, ptr [[X]], i64 [[INDVARS_IV_NEXT_3]]
 ; CHECK-NEXT:    [[TMP8:%.*]] = load float, ptr [[ARRAYIDX_4]], align 4
 ; CHECK-NEXT:    [[MUL_4:%.*]] = fmul fast float [[TMP8]], [[A]]
@@ -46,7 +46,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP9:%.*]] = load float, ptr [[ARRAYIDX2_4]], align 4
 ; CHECK-NEXT:    [[ADD_4:%.*]] = fadd fast float [[MUL_4]], [[TMP9]]
 ; CHECK-NEXT:    store float [[ADD_4]], ptr [[ARRAYIDX2_4]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_3]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 5
 ; CHECK-NEXT:    [[ARRAYIDX_5:%.*]] = getelementptr inbounds float, ptr [[X]], i64 [[INDVARS_IV_NEXT_4]]
 ; CHECK-NEXT:    [[TMP10:%.*]] = load float, ptr [[ARRAYIDX_5]], align 4
 ; CHECK-NEXT:    [[MUL_5:%.*]] = fmul fast float [[TMP10]], [[A]]
@@ -54,7 +54,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP11:%.*]] = load float, ptr [[ARRAYIDX2_5]], align 4
 ; CHECK-NEXT:    [[ADD_5:%.*]] = fadd fast float [[MUL_5]], [[TMP11]]
 ; CHECK-NEXT:    store float [[ADD_5]], ptr [[ARRAYIDX2_5]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_4]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 6
 ; CHECK-NEXT:    [[ARRAYIDX_6:%.*]] = getelementptr inbounds float, ptr [[X]], i64 [[INDVARS_IV_NEXT_5]]
 ; CHECK-NEXT:    [[TMP12:%.*]] = load float, ptr [[ARRAYIDX_6]], align 4
 ; CHECK-NEXT:    [[MUL_6:%.*]] = fmul fast float [[TMP12]], [[A]]
@@ -62,7 +62,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP13:%.*]] = load float, ptr [[ARRAYIDX2_6]], align 4
 ; CHECK-NEXT:    [[ADD_6:%.*]] = fadd fast float [[MUL_6]], [[TMP13]]
 ; CHECK-NEXT:    store float [[ADD_6]], ptr [[ARRAYIDX2_6]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_5]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 7
 ; CHECK-NEXT:    [[ARRAYIDX_7:%.*]] = getelementptr inbounds float, ptr [[X]], i64 [[INDVARS_IV_NEXT_6]]
 ; CHECK-NEXT:    [[TMP14:%.*]] = load float, ptr [[ARRAYIDX_7]], align 4
 ; CHECK-NEXT:    [[MUL_7:%.*]] = fmul fast float [[TMP14]], [[A]]
@@ -70,7 +70,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP15:%.*]] = load float, ptr [[ARRAYIDX2_7]], align 4
 ; CHECK-NEXT:    [[ADD_7:%.*]] = fadd fast float [[MUL_7]], [[TMP15]]
 ; CHECK-NEXT:    store float [[ADD_7]], ptr [[ARRAYIDX2_7]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_7:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_6]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_7:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 8
 ; CHECK-NEXT:    [[ARRAYIDX_8:%.*]] = getelementptr inbounds float, ptr [[X]], i64 [[INDVARS_IV_NEXT_7]]
 ; CHECK-NEXT:    [[TMP16:%.*]] = load float, ptr [[ARRAYIDX_8]], align 4
 ; CHECK-NEXT:    [[MUL_8:%.*]] = fmul fast float [[TMP16]], [[A]]
@@ -78,7 +78,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP17:%.*]] = load float, ptr [[ARRAYIDX2_8]], align 4
 ; CHECK-NEXT:    [[ADD_8:%.*]] = fadd fast float [[MUL_8]], [[TMP17]]
 ; CHECK-NEXT:    store float [[ADD_8]], ptr [[ARRAYIDX2_8]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_8:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_7]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_8:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 9
 ; CHECK-NEXT:    [[ARRAYIDX_9:%.*]] = getelementptr inbounds float, ptr [[X]], i64 [[INDVARS_IV_NEXT_8]]
 ; CHECK-NEXT:    [[TMP18:%.*]] = load float, ptr [[ARRAYIDX_9]], align 4
 ; CHECK-NEXT:    [[MUL_9:%.*]] = fmul fast float [[TMP18]], [[A]]
@@ -86,7 +86,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP19:%.*]] = load float, ptr [[ARRAYIDX2_9]], align 4
 ; CHECK-NEXT:    [[ADD_9:%.*]] = fadd fast float [[MUL_9]], [[TMP19]]
 ; CHECK-NEXT:    store float [[ADD_9]], ptr [[ARRAYIDX2_9]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_9:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_8]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_9:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 10
 ; CHECK-NEXT:    [[ARRAYIDX_10:%.*]] = getelementptr inbounds float, ptr [[X]], i64 [[INDVARS_IV_NEXT_9]]
 ; CHECK-NEXT:    [[TMP20:%.*]] = load float, ptr [[ARRAYIDX_10]], align 4
 ; CHECK-NEXT:    [[MUL_10:%.*]] = fmul fast float [[TMP20]], [[A]]
@@ -94,7 +94,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP21:%.*]] = load float, ptr [[ARRAYIDX2_10]], align 4
 ; CHECK-NEXT:    [[ADD_10:%.*]] = fadd fast float [[MUL_10]], [[TMP21]]
 ; CHECK-NEXT:    store float [[ADD_10]], ptr [[ARRAYIDX2_10]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_10:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_9]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_10:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 11
 ; CHECK-NEXT:    [[ARRAYIDX_11:%.*]] = getelementptr inbounds float, ptr [[X]], i64 [[INDVARS_IV_NEXT_10]]
 ; CHECK-NEXT:    [[TMP22:%.*]] = load float, ptr [[ARRAYIDX_11]], align 4
 ; CHECK-NEXT:    [[MUL_11:%.*]] = fmul fast float [[TMP22]], [[A]]
@@ -102,7 +102,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP23:%.*]] = load float, ptr [[ARRAYIDX2_11]], align 4
 ; CHECK-NEXT:    [[ADD_11:%.*]] = fadd fast float [[MUL_11]], [[TMP23]]
 ; CHECK-NEXT:    store float [[ADD_11]], ptr [[ARRAYIDX2_11]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_11:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_10]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_11:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 12
 ; CHECK-NEXT:    [[ARRAYIDX_12:%.*]] = getelementptr inbounds float, ptr [[X]], i64 [[INDVARS_IV_NEXT_11]]
 ; CHECK-NEXT:    [[TMP24:%.*]] = load float, ptr [[ARRAYIDX_12]], align 4
 ; CHECK-NEXT:    [[MUL_12:%.*]] = fmul fast float [[TMP24]], [[A]]
@@ -110,7 +110,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP25:%.*]] = load float, ptr [[ARRAYIDX2_12]], align 4
 ; CHECK-NEXT:    [[ADD_12:%.*]] = fadd fast float [[MUL_12]], [[TMP25]]
 ; CHECK-NEXT:    store float [[ADD_12]], ptr [[ARRAYIDX2_12]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_12:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_11]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_12:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 13
 ; CHECK-NEXT:    [[ARRAYIDX_13:%.*]] = getelementptr inbounds float, ptr [[X]], i64 [[INDVARS_IV_NEXT_12]]
 ; CHECK-NEXT:    [[TMP26:%.*]] = load float, ptr [[ARRAYIDX_13]], align 4
 ; CHECK-NEXT:    [[MUL_13:%.*]] = fmul fast float [[TMP26]], [[A]]
@@ -118,7 +118,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP27:%.*]] = load float, ptr [[ARRAYIDX2_13]], align 4
 ; CHECK-NEXT:    [[ADD_13:%.*]] = fadd fast float [[MUL_13]], [[TMP27]]
 ; CHECK-NEXT:    store float [[ADD_13]], ptr [[ARRAYIDX2_13]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_13:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_12]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_13:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 14
 ; CHECK-NEXT:    [[ARRAYIDX_14:%.*]] = getelementptr inbounds float, ptr [[X]], i64 [[INDVARS_IV_NEXT_13]]
 ; CHECK-NEXT:    [[TMP28:%.*]] = load float, ptr [[ARRAYIDX_14]], align 4
 ; CHECK-NEXT:    [[MUL_14:%.*]] = fmul fast float [[TMP28]], [[A]]
@@ -126,7 +126,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP29:%.*]] = load float, ptr [[ARRAYIDX2_14]], align 4
 ; CHECK-NEXT:    [[ADD_14:%.*]] = fadd fast float [[MUL_14]], [[TMP29]]
 ; CHECK-NEXT:    store float [[ADD_14]], ptr [[ARRAYIDX2_14]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_14:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_13]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_14:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 15
 ; CHECK-NEXT:    [[ARRAYIDX_15:%.*]] = getelementptr inbounds float, ptr [[X]], i64 [[INDVARS_IV_NEXT_14]]
 ; CHECK-NEXT:    [[TMP30:%.*]] = load float, ptr [[ARRAYIDX_15]], align 4
 ; CHECK-NEXT:    [[MUL_15:%.*]] = fmul fast float [[TMP30]], [[A]]
@@ -134,7 +134,7 @@ define dso_local void @saxpy(float %a, ptr %x, ptr %y) {
 ; CHECK-NEXT:    [[TMP31:%.*]] = load float, ptr [[ARRAYIDX2_15]], align 4
 ; CHECK-NEXT:    [[ADD_15:%.*]] = fadd fast float [[MUL_15]], [[TMP31]]
 ; CHECK-NEXT:    store float [[ADD_15]], ptr [[ARRAYIDX2_15]], align 4
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_15]] = add nuw nsw i64 [[INDVARS_IV_NEXT_14]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_15]] = add nuw nsw i64 [[INDVARS_IV]], 16
 ; CHECK-NEXT:    [[EXITCOND_NOT_15:%.*]] = icmp eq i64 [[INDVARS_IV_NEXT_15]], 64
 ; CHECK-NEXT:    br i1 [[EXITCOND_NOT_15]], label [[EXIT_LOOP:%.*]], label [[FOR_BODY]]
 ; CHECK:       exit_loop:

diff  --git a/llvm/test/Transforms/LoopUnroll/X86/mmx.ll b/llvm/test/Transforms/LoopUnroll/X86/mmx.ll
index 979ce63e440113..b460b79d0640aa 100644
--- a/llvm/test/Transforms/LoopUnroll/X86/mmx.ll
+++ b/llvm/test/Transforms/LoopUnroll/X86/mmx.ll
@@ -10,14 +10,8 @@ define x86_mmx @f() #0 {
 ; CHECK-NEXT:    br label [[FOR_BODY:%.*]]
 ; CHECK:       for.body:
 ; CHECK-NEXT:    [[PHI:%.*]] = phi i32 [ 1, [[ENTRY:%.*]] ], [ [[ADD_7:%.*]], [[FOR_BODY]] ]
-; CHECK-NEXT:    [[ADD:%.*]] = add nuw nsw i32 [[PHI]], 1
-; CHECK-NEXT:    [[ADD_1:%.*]] = add nuw nsw i32 [[ADD]], 1
-; CHECK-NEXT:    [[ADD_2:%.*]] = add nuw nsw i32 [[ADD_1]], 1
-; CHECK-NEXT:    [[ADD_3:%.*]] = add nuw nsw i32 [[ADD_2]], 1
-; CHECK-NEXT:    [[ADD_4:%.*]] = add nuw nsw i32 [[ADD_3]], 1
-; CHECK-NEXT:    [[ADD_5:%.*]] = add nuw nsw i32 [[ADD_4]], 1
-; CHECK-NEXT:    [[ADD_6:%.*]] = add i32 [[ADD_5]], 1
-; CHECK-NEXT:    [[ADD_7]] = add nuw nsw i32 [[ADD_6]], 1
+; CHECK-NEXT:    [[ADD_6:%.*]] = add i32 [[PHI]], 7
+; CHECK-NEXT:    [[ADD_7]] = add i32 [[PHI]], 8
 ; CHECK-NEXT:    [[CMP_7:%.*]] = icmp eq i32 [[ADD_6]], 0
 ; CHECK-NEXT:    br i1 [[CMP_7]], label [[EXIT:%.*]], label [[FOR_BODY]]
 ; CHECK:       exit:

diff  --git a/llvm/test/Transforms/LoopUnroll/add-folding-overflow.ll b/llvm/test/Transforms/LoopUnroll/add-folding-overflow.ll
index 07d2dd81b7c07e..b265e16ed0653b 100644
--- a/llvm/test/Transforms/LoopUnroll/add-folding-overflow.ll
+++ b/llvm/test/Transforms/LoopUnroll/add-folding-overflow.ll
@@ -22,43 +22,40 @@ define void @test(i8 %start1, i8 %start2, i8 %start3, i8 %start4) {
 ; CHECK-NEXT:    call void @use(i8 [[IV3_NEXT]])
 ; CHECK-NEXT:    [[IV4_NEXT:%.*]] = add nsw i8 [[IV4]], 127
 ; CHECK-NEXT:    call void @use(i8 [[IV4_NEXT]])
-; CHECK-NEXT:    [[IV_NEXT:%.*]] = add nuw nsw i32 [[IV]], 1
-; CHECK-NEXT:    [[IV1_NEXT_1:%.*]] = add i8 [[IV1_NEXT]], 1
+; CHECK-NEXT:    [[IV1_NEXT_1:%.*]] = add i8 [[IV1]], 2
 ; CHECK-NEXT:    call void @use(i8 [[IV1_NEXT_1]])
-; CHECK-NEXT:    [[IV2_NEXT_1:%.*]] = add nuw i8 [[IV2_NEXT]], 1
+; CHECK-NEXT:    [[IV2_NEXT_1:%.*]] = add nuw i8 [[IV2]], 2
 ; CHECK-NEXT:    call void @use(i8 [[IV2_NEXT_1]])
-; CHECK-NEXT:    [[IV3_NEXT_1:%.*]] = add nsw i8 [[IV3_NEXT]], 1
+; CHECK-NEXT:    [[IV3_NEXT_1:%.*]] = add nsw i8 [[IV3]], 2
 ; CHECK-NEXT:    call void @use(i8 [[IV3_NEXT_1]])
-; CHECK-NEXT:    [[IV4_NEXT_1:%.*]] = add nsw i8 [[IV4_NEXT]], 127
+; CHECK-NEXT:    [[IV4_NEXT_1:%.*]] = add i8 [[IV4]], -2
 ; CHECK-NEXT:    call void @use(i8 [[IV4_NEXT_1]])
-; CHECK-NEXT:    [[IV_NEXT_1:%.*]] = add nuw nsw i32 [[IV_NEXT]], 1
-; CHECK-NEXT:    [[IV1_NEXT_2:%.*]] = add i8 [[IV1_NEXT_1]], 1
+; CHECK-NEXT:    [[IV1_NEXT_2:%.*]] = add i8 [[IV1]], 3
 ; CHECK-NEXT:    call void @use(i8 [[IV1_NEXT_2]])
-; CHECK-NEXT:    [[IV2_NEXT_2:%.*]] = add nuw i8 [[IV2_NEXT_1]], 1
+; CHECK-NEXT:    [[IV2_NEXT_2:%.*]] = add nuw i8 [[IV2]], 3
 ; CHECK-NEXT:    call void @use(i8 [[IV2_NEXT_2]])
-; CHECK-NEXT:    [[IV3_NEXT_2:%.*]] = add nsw i8 [[IV3_NEXT_1]], 1
+; CHECK-NEXT:    [[IV3_NEXT_2:%.*]] = add nsw i8 [[IV3]], 3
 ; CHECK-NEXT:    call void @use(i8 [[IV3_NEXT_2]])
-; CHECK-NEXT:    [[IV4_NEXT_2:%.*]] = add nsw i8 [[IV4_NEXT_1]], 127
+; CHECK-NEXT:    [[IV4_NEXT_2:%.*]] = add i8 [[IV4]], 125
 ; CHECK-NEXT:    call void @use(i8 [[IV4_NEXT_2]])
-; CHECK-NEXT:    [[IV_NEXT_2:%.*]] = add nuw nsw i32 [[IV_NEXT_1]], 1
-; CHECK-NEXT:    [[IV1_NEXT_3:%.*]] = add i8 [[IV1_NEXT_2]], 1
+; CHECK-NEXT:    [[IV1_NEXT_3:%.*]] = add i8 [[IV1]], 4
 ; CHECK-NEXT:    call void @use(i8 [[IV1_NEXT_3]])
-; CHECK-NEXT:    [[IV2_NEXT_3:%.*]] = add nuw i8 [[IV2_NEXT_2]], 1
+; CHECK-NEXT:    [[IV2_NEXT_3:%.*]] = add nuw i8 [[IV2]], 4
 ; CHECK-NEXT:    call void @use(i8 [[IV2_NEXT_3]])
-; CHECK-NEXT:    [[IV3_NEXT_3:%.*]] = add nsw i8 [[IV3_NEXT_2]], 1
+; CHECK-NEXT:    [[IV3_NEXT_3:%.*]] = add nsw i8 [[IV3]], 4
 ; CHECK-NEXT:    call void @use(i8 [[IV3_NEXT_3]])
-; CHECK-NEXT:    [[IV4_NEXT_3:%.*]] = add nsw i8 [[IV4_NEXT_2]], 127
+; CHECK-NEXT:    [[IV4_NEXT_3:%.*]] = add i8 [[IV4]], -4
 ; CHECK-NEXT:    call void @use(i8 [[IV4_NEXT_3]])
-; CHECK-NEXT:    [[IV_NEXT_3:%.*]] = add nuw nsw i32 [[IV_NEXT_2]], 1
-; CHECK-NEXT:    [[IV1_NEXT_4]] = add i8 [[IV1_NEXT_3]], 1
+; CHECK-NEXT:    [[IV_NEXT_3:%.*]] = add nuw nsw i32 [[IV]], 4
+; CHECK-NEXT:    [[IV1_NEXT_4]] = add i8 [[IV1]], 5
 ; CHECK-NEXT:    call void @use(i8 [[IV1_NEXT_4]])
-; CHECK-NEXT:    [[IV2_NEXT_4]] = add nuw i8 [[IV2_NEXT_3]], 1
+; CHECK-NEXT:    [[IV2_NEXT_4]] = add nuw i8 [[IV2]], 5
 ; CHECK-NEXT:    call void @use(i8 [[IV2_NEXT_4]])
-; CHECK-NEXT:    [[IV3_NEXT_4]] = add nsw i8 [[IV3_NEXT_3]], 1
+; CHECK-NEXT:    [[IV3_NEXT_4]] = add nsw i8 [[IV3]], 5
 ; CHECK-NEXT:    call void @use(i8 [[IV3_NEXT_4]])
-; CHECK-NEXT:    [[IV4_NEXT_4]] = add nsw i8 [[IV4_NEXT_3]], 127
+; CHECK-NEXT:    [[IV4_NEXT_4]] = add i8 [[IV4]], 123
 ; CHECK-NEXT:    call void @use(i8 [[IV4_NEXT_4]])
-; CHECK-NEXT:    [[IV_NEXT_4]] = add nuw nsw i32 [[IV_NEXT_3]], 1
+; CHECK-NEXT:    [[IV_NEXT_4]] = add nuw nsw i32 [[IV]], 5
 ; CHECK-NEXT:    [[CMP_4:%.*]] = icmp eq i32 [[IV_NEXT_3]], 1024
 ; CHECK-NEXT:    br i1 [[CMP_4]], label [[EXIT:%.*]], label [[LOOP]]
 ; CHECK:       exit:

diff  --git a/llvm/test/Transforms/LoopUnroll/full-unroll-keep-first-exit.ll b/llvm/test/Transforms/LoopUnroll/full-unroll-keep-first-exit.ll
index 18cd7cbec0ab5a..a8752db24469fe 100644
--- a/llvm/test/Transforms/LoopUnroll/full-unroll-keep-first-exit.ll
+++ b/llvm/test/Transforms/LoopUnroll/full-unroll-keep-first-exit.ll
@@ -54,7 +54,7 @@ define void @s32_max2(i32 %n, ptr %p) {
 ; CHECK:       do.body.1:
 ; CHECK-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr i32, ptr [[P]], i32 [[INC]]
 ; CHECK-NEXT:    store i32 [[INC]], ptr [[ARRAYIDX_1]], align 4
-; CHECK-NEXT:    [[INC_1:%.*]] = add i32 [[INC]], 1
+; CHECK-NEXT:    [[INC_1:%.*]] = add i32 [[N]], 2
 ; CHECK-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr i32, ptr [[P]], i32 [[INC_1]]
 ; CHECK-NEXT:    store i32 [[INC_1]], ptr [[ARRAYIDX_2]], align 4
 ; CHECK-NEXT:    br label [[DO_END]]
@@ -202,7 +202,7 @@ define void @u32_max2(i32 %n, ptr %p) {
 ; CHECK:       do.body.1:
 ; CHECK-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr i32, ptr [[P]], i32 [[INC]]
 ; CHECK-NEXT:    store i32 [[INC]], ptr [[ARRAYIDX_1]], align 4
-; CHECK-NEXT:    [[INC_1:%.*]] = add i32 [[INC]], 1
+; CHECK-NEXT:    [[INC_1:%.*]] = add i32 [[N]], 2
 ; CHECK-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr i32, ptr [[P]], i32 [[INC_1]]
 ; CHECK-NEXT:    store i32 [[INC_1]], ptr [[ARRAYIDX_2]], align 4
 ; CHECK-NEXT:    br label [[DO_END]]

diff  --git a/llvm/test/Transforms/LoopUnroll/nonlatchcondbr.ll b/llvm/test/Transforms/LoopUnroll/nonlatchcondbr.ll
index ec55d52fa95800..b42d538a142f6e 100644
--- a/llvm/test/Transforms/LoopUnroll/nonlatchcondbr.ll
+++ b/llvm/test/Transforms/LoopUnroll/nonlatchcondbr.ll
@@ -93,7 +93,7 @@ define void @test2(ptr noalias %A) {
 ; CHECK-NEXT:    [[ARRAYIDX_PHI_TRANS_INSERT:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INC]]
 ; CHECK-NEXT:    [[DOTPRE:%.*]] = load i32, ptr [[ARRAYIDX_PHI_TRANS_INSERT]], align 4
 ; CHECK-NEXT:    call void @bar(i32 [[DOTPRE]])
-; CHECK-NEXT:    [[INC_1:%.*]] = add nuw nsw i64 [[INC]], 1
+; CHECK-NEXT:    [[INC_1:%.*]] = add nuw nsw i64 [[I]], 2
 ; CHECK-NEXT:    br i1 true, label [[FOR_BODY_1:%.*]], label [[FOR_BODY_FOR_BODY_CRIT_EDGE_1:%.*]]
 ; CHECK:       for.body.1:
 ; CHECK-NEXT:    [[CMP_1:%.*]] = call i1 @foo(i64 [[INC]])
@@ -102,7 +102,7 @@ define void @test2(ptr noalias %A) {
 ; CHECK-NEXT:    [[ARRAYIDX_PHI_TRANS_INSERT_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INC_1]]
 ; CHECK-NEXT:    [[DOTPRE_1:%.*]] = load i32, ptr [[ARRAYIDX_PHI_TRANS_INSERT_1]], align 4
 ; CHECK-NEXT:    call void @bar(i32 [[DOTPRE_1]])
-; CHECK-NEXT:    [[INC_2:%.*]] = add nuw nsw i64 [[INC_1]], 1
+; CHECK-NEXT:    [[INC_2:%.*]] = add nuw nsw i64 [[I]], 3
 ; CHECK-NEXT:    br i1 true, label [[FOR_BODY_2:%.*]], label [[FOR_BODY_FOR_BODY_CRIT_EDGE_2:%.*]]
 ; CHECK:       for.body.2:
 ; CHECK-NEXT:    [[CMP_2:%.*]] = call i1 @foo(i64 [[INC_1]])
@@ -111,7 +111,7 @@ define void @test2(ptr noalias %A) {
 ; CHECK-NEXT:    [[ARRAYIDX_PHI_TRANS_INSERT_2:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INC_2]]
 ; CHECK-NEXT:    [[DOTPRE_2:%.*]] = load i32, ptr [[ARRAYIDX_PHI_TRANS_INSERT_2]], align 4
 ; CHECK-NEXT:    call void @bar(i32 [[DOTPRE_2]])
-; CHECK-NEXT:    [[INC_3]] = add nsw i64 [[INC_2]], 1
+; CHECK-NEXT:    [[INC_3]] = add nsw i64 [[I]], 4
 ; CHECK-NEXT:    br i1 true, label [[FOR_BODY_3:%.*]], label [[FOR_BODY_FOR_BODY_CRIT_EDGE_3]]
 ; CHECK:       for.body.3:
 ; CHECK-NEXT:    [[CMP_3:%.*]] = call i1 @foo(i64 [[INC_2]])

diff  --git a/llvm/test/Transforms/LoopUnroll/partial-unroll-non-latch-exit.ll b/llvm/test/Transforms/LoopUnroll/partial-unroll-non-latch-exit.ll
index 7738ffbc9da8cd..28e14c4d0aad9c 100644
--- a/llvm/test/Transforms/LoopUnroll/partial-unroll-non-latch-exit.ll
+++ b/llvm/test/Transforms/LoopUnroll/partial-unroll-non-latch-exit.ll
@@ -23,7 +23,7 @@ define i1 @test(ptr %a1, ptr %a2) {
 ; CHECK:       loop.1:
 ; CHECK-NEXT:    br label [[LATCH_1:%.*]]
 ; CHECK:       latch.1:
-; CHECK-NEXT:    [[IV_NEXT_1:%.*]] = add nuw nsw i64 [[IV_NEXT]], 1
+; CHECK-NEXT:    [[IV_NEXT_1:%.*]] = add nuw nsw i64 [[IV]], 2
 ; CHECK-NEXT:    [[GEP1_1:%.*]] = getelementptr inbounds i64, ptr [[A1]], i64 [[IV_NEXT]]
 ; CHECK-NEXT:    [[GEP2_1:%.*]] = getelementptr inbounds i64, ptr [[A2]], i64 [[IV_NEXT]]
 ; CHECK-NEXT:    [[LOAD1_1:%.*]] = load i64, ptr [[GEP1_1]], align 8
@@ -33,7 +33,7 @@ define i1 @test(ptr %a1, ptr %a2) {
 ; CHECK:       loop.2:
 ; CHECK-NEXT:    br label [[LATCH_2:%.*]]
 ; CHECK:       latch.2:
-; CHECK-NEXT:    [[IV_NEXT_2:%.*]] = add nuw nsw i64 [[IV_NEXT_1]], 1
+; CHECK-NEXT:    [[IV_NEXT_2:%.*]] = add nuw nsw i64 [[IV]], 3
 ; CHECK-NEXT:    [[GEP1_2:%.*]] = getelementptr inbounds i64, ptr [[A1]], i64 [[IV_NEXT_1]]
 ; CHECK-NEXT:    [[GEP2_2:%.*]] = getelementptr inbounds i64, ptr [[A2]], i64 [[IV_NEXT_1]]
 ; CHECK-NEXT:    [[LOAD1_2:%.*]] = load i64, ptr [[GEP1_2]], align 8
@@ -43,7 +43,7 @@ define i1 @test(ptr %a1, ptr %a2) {
 ; CHECK:       loop.3:
 ; CHECK-NEXT:    br label [[LATCH_3:%.*]]
 ; CHECK:       latch.3:
-; CHECK-NEXT:    [[IV_NEXT_3:%.*]] = add nuw nsw i64 [[IV_NEXT_2]], 1
+; CHECK-NEXT:    [[IV_NEXT_3:%.*]] = add nuw nsw i64 [[IV]], 4
 ; CHECK-NEXT:    [[GEP1_3:%.*]] = getelementptr inbounds i64, ptr [[A1]], i64 [[IV_NEXT_2]]
 ; CHECK-NEXT:    [[GEP2_3:%.*]] = getelementptr inbounds i64, ptr [[A2]], i64 [[IV_NEXT_2]]
 ; CHECK-NEXT:    [[LOAD1_3:%.*]] = load i64, ptr [[GEP1_3]], align 8
@@ -54,7 +54,7 @@ define i1 @test(ptr %a1, ptr %a2) {
 ; CHECK-NEXT:    [[EXITCOND_4:%.*]] = icmp eq i64 [[IV_NEXT_3]], 24
 ; CHECK-NEXT:    br i1 [[EXITCOND_4]], label [[EXIT]], label [[LATCH_4]]
 ; CHECK:       latch.4:
-; CHECK-NEXT:    [[IV_NEXT_4]] = add nuw nsw i64 [[IV_NEXT_3]], 1
+; CHECK-NEXT:    [[IV_NEXT_4]] = add nuw nsw i64 [[IV]], 5
 ; CHECK-NEXT:    [[GEP1_4:%.*]] = getelementptr inbounds i64, ptr [[A1]], i64 [[IV_NEXT_3]]
 ; CHECK-NEXT:    [[GEP2_4:%.*]] = getelementptr inbounds i64, ptr [[A2]], i64 [[IV_NEXT_3]]
 ; CHECK-NEXT:    [[LOAD1_4:%.*]] = load i64, ptr [[GEP1_4]], align 8

diff  --git a/llvm/test/Transforms/LoopUnroll/partially-unroll-unconditional-latch.ll b/llvm/test/Transforms/LoopUnroll/partially-unroll-unconditional-latch.ll
index 0d7c4d9e68c1f7..8d504371e0156c 100644
--- a/llvm/test/Transforms/LoopUnroll/partially-unroll-unconditional-latch.ll
+++ b/llvm/test/Transforms/LoopUnroll/partially-unroll-unconditional-latch.ll
@@ -19,19 +19,19 @@ define i32 @test_partial_unroll_with_breakout_at_iter0() {
 ; CHECK-NEXT:    br label [[FOR_LATCH:%.*]]
 ; CHECK:       for.latch:
 ; CHECK-NEXT:    [[RED_NEXT_1:%.*]] = add nuw nsw i32 10, [[RED_NEXT]]
-; CHECK-NEXT:    [[IV_NEXT_1:%.*]] = add nuw nsw i64 [[IV_NEXT]], 2
+; CHECK-NEXT:    [[IV_NEXT_1:%.*]] = add nuw nsw i64 [[IV]], 4
 ; CHECK-NEXT:    [[PTR_1:%.*]] = getelementptr inbounds [344 x i32], ptr @table, i64 0, i64 [[IV_NEXT_1]]
 ; CHECK-NEXT:    store i32 [[RED_NEXT_1]], ptr [[PTR_1]], align 4
 ; CHECK-NEXT:    br label [[FOR_LATCH_1:%.*]]
 ; CHECK:       for.latch.1:
 ; CHECK-NEXT:    [[RED_NEXT_2:%.*]] = add nuw nsw i32 10, [[RED_NEXT_1]]
-; CHECK-NEXT:    [[IV_NEXT_2:%.*]] = add nuw nsw i64 [[IV_NEXT_1]], 2
+; CHECK-NEXT:    [[IV_NEXT_2:%.*]] = add nuw nsw i64 [[IV]], 6
 ; CHECK-NEXT:    [[PTR_2:%.*]] = getelementptr inbounds [344 x i32], ptr @table, i64 0, i64 [[IV_NEXT_2]]
 ; CHECK-NEXT:    store i32 [[RED_NEXT_2]], ptr [[PTR_2]], align 4
 ; CHECK-NEXT:    br label [[FOR_LATCH_2:%.*]]
 ; CHECK:       for.latch.2:
 ; CHECK-NEXT:    [[RED_NEXT_3]] = add nuw nsw i32 10, [[RED_NEXT_2]]
-; CHECK-NEXT:    [[IV_NEXT_3]] = add nuw nsw i64 [[IV_NEXT_2]], 2
+; CHECK-NEXT:    [[IV_NEXT_3]] = add nuw nsw i64 [[IV]], 8
 ; CHECK-NEXT:    [[PTR_3:%.*]] = getelementptr inbounds [344 x i32], ptr @table, i64 0, i64 [[IV_NEXT_3]]
 ; CHECK-NEXT:    store i32 [[RED_NEXT_3]], ptr [[PTR_3]], align 4
 ; CHECK-NEXT:    [[EXITCOND_1_I_3:%.*]] = icmp eq i64 [[IV_NEXT_3]], 344

diff  --git a/llvm/test/Transforms/LoopUnroll/runtime-exit-phi-scev-invalidation.ll b/llvm/test/Transforms/LoopUnroll/runtime-exit-phi-scev-invalidation.ll
index 3f0e2b3a195c5f..abf8df406037cc 100644
--- a/llvm/test/Transforms/LoopUnroll/runtime-exit-phi-scev-invalidation.ll
+++ b/llvm/test/Transforms/LoopUnroll/runtime-exit-phi-scev-invalidation.ll
@@ -27,54 +27,40 @@ define void @pr56282() {
 ; CHECK:       inner.1.header:
 ; CHECK-NEXT:    [[INNER_1_IV:%.*]] = phi i64 [ 0, [[OUTER_HEADER_NEW]] ], [ [[INNER_1_IV_NEXT_7:%.*]], [[INNER_1_LATCH_7:%.*]] ]
 ; CHECK-NEXT:    [[NITER:%.*]] = phi i64 [ 0, [[OUTER_HEADER_NEW]] ], [ [[NITER_NEXT_7:%.*]], [[INNER_1_LATCH_7]] ]
-; CHECK-NEXT:    [[INNER_1_IV_NEXT:%.*]] = add nuw nsw i64 [[INNER_1_IV]], 1
 ; CHECK-NEXT:    [[V:%.*]] = call i32 @get()
 ; CHECK-NEXT:    [[C_1:%.*]] = icmp ugt i32 [[V]], 0
 ; CHECK-NEXT:    br i1 [[C_1]], label [[INNER_1_LATCH:%.*]], label [[EXIT_DEOPT_LOOPEXIT:%.*]]
 ; CHECK:       inner.1.latch:
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i64 [[NITER]], 1
-; CHECK-NEXT:    [[INNER_1_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INNER_1_IV_NEXT]], 1
 ; CHECK-NEXT:    [[V_1:%.*]] = call i32 @get()
 ; CHECK-NEXT:    [[C_1_1:%.*]] = icmp ugt i32 [[V_1]], 0
 ; CHECK-NEXT:    br i1 [[C_1_1]], label [[INNER_1_LATCH_1:%.*]], label [[EXIT_DEOPT_LOOPEXIT]]
 ; CHECK:       inner.1.latch.1:
-; CHECK-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i64 [[NITER_NEXT]], 1
-; CHECK-NEXT:    [[INNER_1_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INNER_1_IV_NEXT_1]], 1
 ; CHECK-NEXT:    [[V_2:%.*]] = call i32 @get()
 ; CHECK-NEXT:    [[C_1_2:%.*]] = icmp ugt i32 [[V_2]], 0
 ; CHECK-NEXT:    br i1 [[C_1_2]], label [[INNER_1_LATCH_2:%.*]], label [[EXIT_DEOPT_LOOPEXIT]]
 ; CHECK:       inner.1.latch.2:
-; CHECK-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i64 [[NITER_NEXT_1]], 1
-; CHECK-NEXT:    [[INNER_1_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INNER_1_IV_NEXT_2]], 1
 ; CHECK-NEXT:    [[V_3:%.*]] = call i32 @get()
 ; CHECK-NEXT:    [[C_1_3:%.*]] = icmp ugt i32 [[V_3]], 0
 ; CHECK-NEXT:    br i1 [[C_1_3]], label [[INNER_1_LATCH_3:%.*]], label [[EXIT_DEOPT_LOOPEXIT]]
 ; CHECK:       inner.1.latch.3:
-; CHECK-NEXT:    [[NITER_NEXT_3:%.*]] = add nuw nsw i64 [[NITER_NEXT_2]], 1
-; CHECK-NEXT:    [[INNER_1_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INNER_1_IV_NEXT_3]], 1
 ; CHECK-NEXT:    [[V_4:%.*]] = call i32 @get()
 ; CHECK-NEXT:    [[C_1_4:%.*]] = icmp ugt i32 [[V_4]], 0
 ; CHECK-NEXT:    br i1 [[C_1_4]], label [[INNER_1_LATCH_4:%.*]], label [[EXIT_DEOPT_LOOPEXIT]]
 ; CHECK:       inner.1.latch.4:
-; CHECK-NEXT:    [[NITER_NEXT_4:%.*]] = add nuw nsw i64 [[NITER_NEXT_3]], 1
-; CHECK-NEXT:    [[INNER_1_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INNER_1_IV_NEXT_4]], 1
 ; CHECK-NEXT:    [[V_5:%.*]] = call i32 @get()
 ; CHECK-NEXT:    [[C_1_5:%.*]] = icmp ugt i32 [[V_5]], 0
 ; CHECK-NEXT:    br i1 [[C_1_5]], label [[INNER_1_LATCH_5:%.*]], label [[EXIT_DEOPT_LOOPEXIT]]
 ; CHECK:       inner.1.latch.5:
-; CHECK-NEXT:    [[NITER_NEXT_5:%.*]] = add nuw nsw i64 [[NITER_NEXT_4]], 1
-; CHECK-NEXT:    [[INNER_1_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INNER_1_IV_NEXT_5]], 1
 ; CHECK-NEXT:    [[V_6:%.*]] = call i32 @get()
 ; CHECK-NEXT:    [[C_1_6:%.*]] = icmp ugt i32 [[V_6]], 0
 ; CHECK-NEXT:    br i1 [[C_1_6]], label [[INNER_1_LATCH_6:%.*]], label [[EXIT_DEOPT_LOOPEXIT]]
 ; CHECK:       inner.1.latch.6:
-; CHECK-NEXT:    [[NITER_NEXT_6:%.*]] = add nuw nsw i64 [[NITER_NEXT_5]], 1
-; CHECK-NEXT:    [[INNER_1_IV_NEXT_7]] = add nuw nsw i64 [[INNER_1_IV_NEXT_6]], 1
+; CHECK-NEXT:    [[INNER_1_IV_NEXT_7]] = add nuw nsw i64 [[INNER_1_IV]], 8
 ; CHECK-NEXT:    [[V_7:%.*]] = call i32 @get()
 ; CHECK-NEXT:    [[C_1_7:%.*]] = icmp ugt i32 [[V_7]], 0
 ; CHECK-NEXT:    br i1 [[C_1_7]], label [[INNER_1_LATCH_7]], label [[EXIT_DEOPT_LOOPEXIT]]
 ; CHECK:       inner.1.latch.7:
-; CHECK-NEXT:    [[NITER_NEXT_7]] = add i64 [[NITER_NEXT_6]], 1
+; CHECK-NEXT:    [[NITER_NEXT_7]] = add i64 [[NITER]], 8
 ; CHECK-NEXT:    [[NITER_NCMP_7:%.*]] = icmp ne i64 [[NITER_NEXT_7]], [[UNROLL_ITER]]
 ; CHECK-NEXT:    br i1 [[NITER_NCMP_7]], label [[INNER_1_HEADER]], label [[OUTER_MIDDLE_UNR_LCSSA_LOOPEXIT:%.*]]
 ; CHECK:       outer.middle.unr-lcssa.loopexit:
@@ -213,45 +199,39 @@ define void @pr56286(i64 %x, ptr %src, ptr %dst, ptr %ptr.src) !prof !0 {
 ; CHECK:       inner.1.latch:
 ; CHECK-NEXT:    [[L_1:%.*]] = load i32, ptr [[SRC]], align 4
 ; CHECK-NEXT:    store i32 [[L_1]], ptr [[DST]], align 8
-; CHECK-NEXT:    [[INNER_1_IV_NEXT:%.*]] = add i64 [[INNER_1_IV]], 1
 ; CHECK-NEXT:    br i1 false, label [[EXIT_DEOPT_LOOPEXIT]], label [[INNER_1_LATCH_1:%.*]]
 ; CHECK:       inner.1.latch.1:
 ; CHECK-NEXT:    [[L_1_1:%.*]] = load i32, ptr [[SRC]], align 4
 ; CHECK-NEXT:    store i32 [[L_1_1]], ptr [[DST]], align 8
-; CHECK-NEXT:    [[INNER_1_IV_NEXT_1:%.*]] = add i64 [[INNER_1_IV_NEXT]], 1
 ; CHECK-NEXT:    [[CMP_1_2:%.*]] = icmp sgt i32 [[OUTER_P]], 0
 ; CHECK-NEXT:    br i1 [[CMP_1_2]], label [[EXIT_DEOPT_LOOPEXIT]], label [[INNER_1_LATCH_2:%.*]]
 ; CHECK:       inner.1.latch.2:
 ; CHECK-NEXT:    [[L_1_2:%.*]] = load i32, ptr [[SRC]], align 4
 ; CHECK-NEXT:    store i32 [[L_1_2]], ptr [[DST]], align 8
-; CHECK-NEXT:    [[INNER_1_IV_NEXT_2:%.*]] = add i64 [[INNER_1_IV_NEXT_1]], 1
 ; CHECK-NEXT:    br i1 false, label [[EXIT_DEOPT_LOOPEXIT]], label [[INNER_1_LATCH_3:%.*]]
 ; CHECK:       inner.1.latch.3:
 ; CHECK-NEXT:    [[L_1_3:%.*]] = load i32, ptr [[SRC]], align 4
 ; CHECK-NEXT:    store i32 [[L_1_3]], ptr [[DST]], align 8
-; CHECK-NEXT:    [[INNER_1_IV_NEXT_3:%.*]] = add i64 [[INNER_1_IV_NEXT_2]], 1
 ; CHECK-NEXT:    [[CMP_1_4:%.*]] = icmp sgt i32 [[OUTER_P]], 0
 ; CHECK-NEXT:    br i1 [[CMP_1_4]], label [[EXIT_DEOPT_LOOPEXIT]], label [[INNER_1_LATCH_4:%.*]]
 ; CHECK:       inner.1.latch.4:
 ; CHECK-NEXT:    [[L_1_4:%.*]] = load i32, ptr [[SRC]], align 4
 ; CHECK-NEXT:    store i32 [[L_1_4]], ptr [[DST]], align 8
-; CHECK-NEXT:    [[INNER_1_IV_NEXT_4:%.*]] = add i64 [[INNER_1_IV_NEXT_3]], 1
 ; CHECK-NEXT:    br i1 false, label [[EXIT_DEOPT_LOOPEXIT]], label [[INNER_1_LATCH_5:%.*]]
 ; CHECK:       inner.1.latch.5:
 ; CHECK-NEXT:    [[L_1_5:%.*]] = load i32, ptr [[SRC]], align 4
 ; CHECK-NEXT:    store i32 [[L_1_5]], ptr [[DST]], align 8
-; CHECK-NEXT:    [[INNER_1_IV_NEXT_5:%.*]] = add i64 [[INNER_1_IV_NEXT_4]], 1
 ; CHECK-NEXT:    [[CMP_1_6:%.*]] = icmp sgt i32 [[OUTER_P]], 0
 ; CHECK-NEXT:    br i1 [[CMP_1_6]], label [[EXIT_DEOPT_LOOPEXIT]], label [[INNER_1_LATCH_6:%.*]]
 ; CHECK:       inner.1.latch.6:
 ; CHECK-NEXT:    [[L_1_6:%.*]] = load i32, ptr [[SRC]], align 4
 ; CHECK-NEXT:    store i32 [[L_1_6]], ptr [[DST]], align 8
-; CHECK-NEXT:    [[INNER_1_IV_NEXT_6:%.*]] = add i64 [[INNER_1_IV_NEXT_5]], 1
+; CHECK-NEXT:    [[INNER_1_IV_NEXT_6:%.*]] = add i64 [[INNER_1_IV]], 7
 ; CHECK-NEXT:    br i1 false, label [[EXIT_DEOPT_LOOPEXIT]], label [[INNER_1_LATCH_7]]
 ; CHECK:       inner.1.latch.7:
 ; CHECK-NEXT:    [[L_1_7:%.*]] = load i32, ptr [[SRC]], align 4
 ; CHECK-NEXT:    store i32 [[L_1_7]], ptr [[DST]], align 8
-; CHECK-NEXT:    [[INNER_1_IV_NEXT_7]] = add i64 [[INNER_1_IV_NEXT_6]], 1
+; CHECK-NEXT:    [[INNER_1_IV_NEXT_7]] = add i64 [[INNER_1_IV]], 8
 ; CHECK-NEXT:    [[CMP_2_7:%.*]] = icmp sgt i64 [[INNER_1_IV_NEXT_6]], 0
 ; CHECK-NEXT:    br i1 [[CMP_2_7]], label [[OUTER_MIDDLE_UNR_LCSSA:%.*]], label [[INNER_1_HEADER]], !prof [[PROF5:![0-9]+]]
 ; CHECK:       outer.middle.unr-lcssa:
@@ -269,7 +249,6 @@ define void @pr56286(i64 %x, ptr %src, ptr %dst, ptr %ptr.src) !prof !0 {
 ; CHECK-NEXT:    [[ADD_1:%.*]] = add i32 [[INNER_2_IV]], [[L_2]]
 ; CHECK-NEXT:    [[TMP281:%.*]] = call i32 @use.2(ptr [[TMP27]], i32 [[ADD_1]])
 ; CHECK-NEXT:    [[TMP31:%.*]] = shl nuw nsw i32 [[TMP15]], 16
-; CHECK-NEXT:    [[TMP32:%.*]] = add nuw i32 [[TMP31]], 262144
 ; CHECK-NEXT:    call void @bar()
 ; CHECK-NEXT:    call void @bar()
 ; CHECK-NEXT:    call void @bar()
@@ -279,11 +258,11 @@ define void @pr56286(i64 %x, ptr %src, ptr %dst, ptr %ptr.src) !prof !0 {
 ; CHECK-NEXT:    call void @bar()
 ; CHECK-NEXT:    call void @bar()
 ; CHECK-NEXT:    [[L_2_1:%.*]] = load i32, ptr [[SRC]], align 8
-; CHECK-NEXT:    [[INNER_2_IV_NEXT_1:%.*]] = add i32 [[INNER_2_IV_NEXT]], 1
+; CHECK-NEXT:    [[INNER_2_IV_NEXT_1:%.*]] = add i32 [[INNER_2_IV]], 2
 ; CHECK-NEXT:    [[TMP27_1:%.*]] = load ptr, ptr [[PTR_SRC]], align 8
 ; CHECK-NEXT:    [[ADD_1_1:%.*]] = add i32 [[INNER_2_IV_NEXT]], [[L_2_1]]
 ; CHECK-NEXT:    [[TMP281_1:%.*]] = call i32 @use.2(ptr [[TMP27_1]], i32 [[ADD_1_1]])
-; CHECK-NEXT:    [[TMP32_1:%.*]] = add nuw i32 [[TMP32]], 262144
+; CHECK-NEXT:    [[TMP32_1:%.*]] = add nuw i32 [[TMP31]], 524288
 ; CHECK-NEXT:    call void @bar()
 ; CHECK-NEXT:    call void @bar()
 ; CHECK-NEXT:    call void @bar()
@@ -293,11 +272,11 @@ define void @pr56286(i64 %x, ptr %src, ptr %dst, ptr %ptr.src) !prof !0 {
 ; CHECK-NEXT:    call void @bar()
 ; CHECK-NEXT:    call void @bar()
 ; CHECK-NEXT:    [[L_2_2:%.*]] = load i32, ptr [[SRC]], align 8
-; CHECK-NEXT:    [[INNER_2_IV_NEXT_2]] = add i32 [[INNER_2_IV_NEXT_1]], 1
+; CHECK-NEXT:    [[INNER_2_IV_NEXT_2]] = add i32 [[INNER_2_IV]], 3
 ; CHECK-NEXT:    [[TMP27_2:%.*]] = load ptr, ptr [[PTR_SRC]], align 8
 ; CHECK-NEXT:    [[ADD_1_2:%.*]] = add i32 [[INNER_2_IV_NEXT_1]], [[L_2_2]]
 ; CHECK-NEXT:    [[TMP281_2:%.*]] = call i32 @use.2(ptr [[TMP27_2]], i32 [[ADD_1_2]])
-; CHECK-NEXT:    [[TMP32_2:%.*]] = add nuw i32 [[TMP32_1]], 262144
+; CHECK-NEXT:    [[TMP32_2:%.*]] = add nuw i32 [[TMP31]], 786432
 ; CHECK-NEXT:    [[TMP33_2]] = ashr exact i32 [[TMP32_2]], 16
 ; CHECK-NEXT:    call void @bar()
 ; CHECK-NEXT:    call void @bar()

diff  --git a/llvm/test/Transforms/LoopUnroll/runtime-loop-at-most-two-exits.ll b/llvm/test/Transforms/LoopUnroll/runtime-loop-at-most-two-exits.ll
index 9ccee95678502d..d5864e91c13e9a 100644
--- a/llvm/test/Transforms/LoopUnroll/runtime-loop-at-most-two-exits.ll
+++ b/llvm/test/Transforms/LoopUnroll/runtime-loop-at-most-two-exits.ll
@@ -24,59 +24,52 @@ define i32 @test(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[TMP3:%.*]] = load i32, ptr [[ARRAYIDX]], align 4
 ; ENABLED-NEXT:    [[ADD:%.*]] = add nsw i32 [[TMP3]], [[SUM_02]]
 ; ENABLED-NEXT:    [[INDVARS_IV_NEXT:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; ENABLED-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i64 [[NITER]], 1
 ; ENABLED-NEXT:    br i1 false, label [[FOR_EXIT2_LOOPEXIT]], label [[FOR_BODY_1:%.*]]
 ; ENABLED:       for.body.1:
 ; ENABLED-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT]]
 ; ENABLED-NEXT:    [[TMP4:%.*]] = load i32, ptr [[ARRAYIDX_1]], align 4
 ; ENABLED-NEXT:    [[ADD_1:%.*]] = add nsw i32 [[TMP4]], [[ADD]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i64 [[NITER_NEXT]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 2
 ; ENABLED-NEXT:    [[CMP_2:%.*]] = icmp eq i64 [[N]], 42
 ; ENABLED-NEXT:    br i1 [[CMP_2]], label [[FOR_EXIT2_LOOPEXIT]], label [[FOR_BODY_2:%.*]]
 ; ENABLED:       for.body.2:
 ; ENABLED-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_1]]
 ; ENABLED-NEXT:    [[TMP5:%.*]] = load i32, ptr [[ARRAYIDX_2]], align 4
 ; ENABLED-NEXT:    [[ADD_2:%.*]] = add nsw i32 [[TMP5]], [[ADD_1]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_1]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i64 [[NITER_NEXT_1]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 3
 ; ENABLED-NEXT:    br i1 false, label [[FOR_EXIT2_LOOPEXIT]], label [[FOR_BODY_3:%.*]]
 ; ENABLED:       for.body.3:
 ; ENABLED-NEXT:    [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_2]]
 ; ENABLED-NEXT:    [[TMP6:%.*]] = load i32, ptr [[ARRAYIDX_3]], align 4
 ; ENABLED-NEXT:    [[ADD_3:%.*]] = add nsw i32 [[TMP6]], [[ADD_2]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_2]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_3:%.*]] = add nuw nsw i64 [[NITER_NEXT_2]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 4
 ; ENABLED-NEXT:    [[CMP_4:%.*]] = icmp eq i64 [[N]], 42
 ; ENABLED-NEXT:    br i1 [[CMP_4]], label [[FOR_EXIT2_LOOPEXIT]], label [[FOR_BODY_4:%.*]]
 ; ENABLED:       for.body.4:
 ; ENABLED-NEXT:    [[ARRAYIDX_4:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_3]]
 ; ENABLED-NEXT:    [[TMP7:%.*]] = load i32, ptr [[ARRAYIDX_4]], align 4
 ; ENABLED-NEXT:    [[ADD_4:%.*]] = add nsw i32 [[TMP7]], [[ADD_3]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_3]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_4:%.*]] = add nuw nsw i64 [[NITER_NEXT_3]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 5
 ; ENABLED-NEXT:    br i1 false, label [[FOR_EXIT2_LOOPEXIT]], label [[FOR_BODY_5:%.*]]
 ; ENABLED:       for.body.5:
 ; ENABLED-NEXT:    [[ARRAYIDX_5:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_4]]
 ; ENABLED-NEXT:    [[TMP8:%.*]] = load i32, ptr [[ARRAYIDX_5]], align 4
 ; ENABLED-NEXT:    [[ADD_5:%.*]] = add nsw i32 [[TMP8]], [[ADD_4]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_4]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_5:%.*]] = add nuw nsw i64 [[NITER_NEXT_4]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 6
 ; ENABLED-NEXT:    [[CMP_6:%.*]] = icmp eq i64 [[N]], 42
 ; ENABLED-NEXT:    br i1 [[CMP_6]], label [[FOR_EXIT2_LOOPEXIT]], label [[FOR_BODY_6:%.*]]
 ; ENABLED:       for.body.6:
 ; ENABLED-NEXT:    [[ARRAYIDX_6:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_5]]
 ; ENABLED-NEXT:    [[TMP9:%.*]] = load i32, ptr [[ARRAYIDX_6]], align 4
 ; ENABLED-NEXT:    [[ADD_6:%.*]] = add nsw i32 [[TMP9]], [[ADD_5]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_5]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_6:%.*]] = add nuw nsw i64 [[NITER_NEXT_5]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 7
 ; ENABLED-NEXT:    br i1 false, label [[FOR_EXIT2_LOOPEXIT]], label [[FOR_BODY_7]]
 ; ENABLED:       for.body.7:
 ; ENABLED-NEXT:    [[ARRAYIDX_7:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_6]]
 ; ENABLED-NEXT:    [[TMP10:%.*]] = load i32, ptr [[ARRAYIDX_7]], align 4
 ; ENABLED-NEXT:    [[ADD_7]] = add nsw i32 [[TMP10]], [[ADD_6]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_7]] = add i64 [[INDVARS_IV_NEXT_6]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_7]] = add i64 [[NITER_NEXT_6]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_7]] = add i64 [[INDVARS_IV]], 8
+; ENABLED-NEXT:    [[NITER_NEXT_7]] = add i64 [[NITER]], 8
 ; ENABLED-NEXT:    [[NITER_NCMP_7:%.*]] = icmp eq i64 [[NITER_NEXT_7]], [[UNROLL_ITER]]
 ; ENABLED-NEXT:    br i1 [[NITER_NCMP_7]], label [[FOR_END_UNR_LCSSA_LOOPEXIT:%.*]], label [[HEADER]]
 ; ENABLED:       for.end.unr-lcssa.loopexit:

diff  --git a/llvm/test/Transforms/LoopUnroll/runtime-loop-multiexit-dom-verify.ll b/llvm/test/Transforms/LoopUnroll/runtime-loop-multiexit-dom-verify.ll
index 2c923c1901eedd..de548523134568 100644
--- a/llvm/test/Transforms/LoopUnroll/runtime-loop-multiexit-dom-verify.ll
+++ b/llvm/test/Transforms/LoopUnroll/runtime-loop-multiexit-dom-verify.ll
@@ -27,7 +27,7 @@ define i64 @test1() {
 ; CHECK-NEXT:    [[CMP2:%.*]] = icmp ult i64 [[SHFT]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP2]], label [[HEADER_1:%.*]], label [[LATCHEXIT:%.*]]
 ; CHECK:       header.1:
-; CHECK-NEXT:    [[ADD_IV_1:%.*]] = add nuw nsw i64 [[ADD_IV]], 2
+; CHECK-NEXT:    [[ADD_IV_1:%.*]] = add nuw nsw i64 [[IV]], 4
 ; CHECK-NEXT:    [[CMP1_1:%.*]] = icmp ult i64 [[ADD_IV_1]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP1_1]], label [[LATCH_1:%.*]], label [[HEADEREXIT]]
 ; CHECK:       latch.1:
@@ -35,7 +35,7 @@ define i64 @test1() {
 ; CHECK-NEXT:    [[CMP2_1:%.*]] = icmp ult i64 [[SHFT_1]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP2_1]], label [[HEADER_2:%.*]], label [[LATCHEXIT]]
 ; CHECK:       header.2:
-; CHECK-NEXT:    [[ADD_IV_2:%.*]] = add nuw nsw i64 [[ADD_IV_1]], 2
+; CHECK-NEXT:    [[ADD_IV_2:%.*]] = add nuw nsw i64 [[IV]], 6
 ; CHECK-NEXT:    [[CMP1_2:%.*]] = icmp ult i64 [[ADD_IV_2]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP1_2]], label [[LATCH_2:%.*]], label [[HEADEREXIT]]
 ; CHECK:       latch.2:
@@ -43,7 +43,7 @@ define i64 @test1() {
 ; CHECK-NEXT:    [[CMP2_2:%.*]] = icmp ult i64 [[SHFT_2]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP2_2]], label [[HEADER_3:%.*]], label [[LATCHEXIT]]
 ; CHECK:       header.3:
-; CHECK-NEXT:    [[ADD_IV_3]] = add nuw nsw i64 [[ADD_IV_2]], 2
+; CHECK-NEXT:    [[ADD_IV_3]] = add nuw nsw i64 [[IV]], 8
 ; CHECK-NEXT:    [[CMP1_3:%.*]] = icmp ult i64 [[ADD_IV_3]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP1_3]], label [[LATCH_3]], label [[HEADEREXIT]]
 ; CHECK:       latch.3:
@@ -109,7 +109,7 @@ define  void @test2(i1 %cond, i32 %n) {
 ; CHECK-NEXT:    [[CMP2:%.*]] = icmp ult i64 [[SHFT]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP2]], label [[HEADER_1:%.*]], label [[LATCHEXIT:%.*]]
 ; CHECK:       header.1:
-; CHECK-NEXT:    [[ADD_IV_1:%.*]] = add nuw nsw i64 [[ADD_IV]], 2
+; CHECK-NEXT:    [[ADD_IV_1:%.*]] = add nuw nsw i64 [[IV]], 4
 ; CHECK-NEXT:    [[CMP1_1:%.*]] = icmp ult i64 [[ADD_IV_1]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP1_1]], label [[LATCH_1:%.*]], label [[HEADEREXIT]]
 ; CHECK:       latch.1:
@@ -117,7 +117,7 @@ define  void @test2(i1 %cond, i32 %n) {
 ; CHECK-NEXT:    [[CMP2_1:%.*]] = icmp ult i64 [[SHFT_1]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP2_1]], label [[HEADER_2:%.*]], label [[LATCHEXIT]]
 ; CHECK:       header.2:
-; CHECK-NEXT:    [[ADD_IV_2:%.*]] = add nuw nsw i64 [[ADD_IV_1]], 2
+; CHECK-NEXT:    [[ADD_IV_2:%.*]] = add nuw nsw i64 [[IV]], 6
 ; CHECK-NEXT:    [[CMP1_2:%.*]] = icmp ult i64 [[ADD_IV_2]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP1_2]], label [[LATCH_2:%.*]], label [[HEADEREXIT]]
 ; CHECK:       latch.2:
@@ -125,7 +125,7 @@ define  void @test2(i1 %cond, i32 %n) {
 ; CHECK-NEXT:    [[CMP2_2:%.*]] = icmp ult i64 [[SHFT_2]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP2_2]], label [[HEADER_3:%.*]], label [[LATCHEXIT]]
 ; CHECK:       header.3:
-; CHECK-NEXT:    [[ADD_IV_3]] = add nuw nsw i64 [[ADD_IV_2]], 2
+; CHECK-NEXT:    [[ADD_IV_3]] = add nuw nsw i64 [[IV]], 8
 ; CHECK-NEXT:    [[CMP1_3:%.*]] = icmp ult i64 [[ADD_IV_3]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP1_3]], label [[LATCH_3]], label [[HEADEREXIT]]
 ; CHECK:       latch.3:
@@ -186,7 +186,7 @@ define i64 @test3(i32 %n) {
 ; CHECK-NEXT:    [[CMP2:%.*]] = icmp ult i64 [[SHFT]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP2]], label [[HEADER_1:%.*]], label [[LATCHEXIT:%.*]]
 ; CHECK:       header.1:
-; CHECK-NEXT:    [[ADD_IV_1:%.*]] = add nuw nsw i64 [[ADD_IV]], 2
+; CHECK-NEXT:    [[ADD_IV_1:%.*]] = add nuw nsw i64 [[IV]], 4
 ; CHECK-NEXT:    [[CMP1_1:%.*]] = icmp ult i64 [[ADD_IV_1]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP1_1]], label [[LATCH_1:%.*]], label [[HEADEREXIT]]
 ; CHECK:       latch.1:
@@ -194,7 +194,7 @@ define i64 @test3(i32 %n) {
 ; CHECK-NEXT:    [[CMP2_1:%.*]] = icmp ult i64 [[SHFT_1]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP2_1]], label [[HEADER_2:%.*]], label [[LATCHEXIT]]
 ; CHECK:       header.2:
-; CHECK-NEXT:    [[ADD_IV_2:%.*]] = add nuw nsw i64 [[ADD_IV_1]], 2
+; CHECK-NEXT:    [[ADD_IV_2:%.*]] = add nuw nsw i64 [[IV]], 6
 ; CHECK-NEXT:    [[CMP1_2:%.*]] = icmp ult i64 [[ADD_IV_2]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP1_2]], label [[LATCH_2:%.*]], label [[HEADEREXIT]]
 ; CHECK:       latch.2:
@@ -202,7 +202,7 @@ define i64 @test3(i32 %n) {
 ; CHECK-NEXT:    [[CMP2_2:%.*]] = icmp ult i64 [[SHFT_2]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP2_2]], label [[HEADER_3:%.*]], label [[LATCHEXIT]]
 ; CHECK:       header.3:
-; CHECK-NEXT:    [[ADD_IV_3]] = add nuw nsw i64 [[ADD_IV_2]], 2
+; CHECK-NEXT:    [[ADD_IV_3]] = add nuw nsw i64 [[IV]], 8
 ; CHECK-NEXT:    [[CMP1_3:%.*]] = icmp ult i64 [[ADD_IV_3]], [[TRIP]]
 ; CHECK-NEXT:    br i1 [[CMP1_3]], label [[LATCH_3]], label [[HEADEREXIT]]
 ; CHECK:       latch.3:
@@ -292,7 +292,6 @@ define void @test4(i16 %c3) {
 ; CHECK-NEXT:    i16 95, label [[LATCH:%.*]]
 ; CHECK-NEXT:    ]
 ; CHECK:       latch:
-; CHECK-NEXT:    [[INDVARS_IV_NEXT:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 1
 ; CHECK-NEXT:    br label [[EXITING_1:%.*]]
 ; CHECK:       exiting.1:
 ; CHECK-NEXT:    switch i16 [[C3]], label [[DEFAULT_LOOPEXIT_LOOPEXIT]] [
@@ -300,7 +299,6 @@ define void @test4(i16 %c3) {
 ; CHECK-NEXT:    i16 95, label [[LATCH_1:%.*]]
 ; CHECK-NEXT:    ]
 ; CHECK:       latch.1:
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT]], 1
 ; CHECK-NEXT:    br label [[EXITING_2:%.*]]
 ; CHECK:       exiting.2:
 ; CHECK-NEXT:    switch i16 [[C3]], label [[DEFAULT_LOOPEXIT_LOOPEXIT]] [
@@ -308,7 +306,6 @@ define void @test4(i16 %c3) {
 ; CHECK-NEXT:    i16 95, label [[LATCH_2:%.*]]
 ; CHECK-NEXT:    ]
 ; CHECK:       latch.2:
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_1]], 1
 ; CHECK-NEXT:    br label [[EXITING_3:%.*]]
 ; CHECK:       exiting.3:
 ; CHECK-NEXT:    switch i16 [[C3]], label [[DEFAULT_LOOPEXIT_LOOPEXIT]] [
@@ -316,7 +313,7 @@ define void @test4(i16 %c3) {
 ; CHECK-NEXT:    i16 95, label [[LATCH_3]]
 ; CHECK-NEXT:    ]
 ; CHECK:       latch.3:
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_3]] = add nuw nsw i64 [[INDVARS_IV_NEXT_2]], 1
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_3]] = add nuw nsw i64 [[INDVARS_IV]], 4
 ; CHECK-NEXT:    [[C2_3:%.*]] = icmp ult i64 [[INDVARS_IV_NEXT_3]], [[C1]]
 ; CHECK-NEXT:    br i1 [[C2_3]], label [[HEADER]], label [[LATCHEXIT_UNR_LCSSA:%.*]], !llvm.loop [[LOOP5:![0-9]+]]
 ; CHECK:       latchexit.unr-lcssa:
@@ -469,7 +466,6 @@ define void @test5() {
 ; CHECK:       innerLatch.3:
 ; CHECK-NEXT:    br i1 false, label [[INNERH]], label [[OUTERLATCH]], !llvm.loop [[LOOP6]]
 ; CHECK:       outerLatch:
-; CHECK-NEXT:    [[TMP6:%.*]] = add i32 [[TMP4]], 1
 ; CHECK-NEXT:    br label [[INNERH_14:%.*]]
 ; CHECK:       innerH.14:
 ; CHECK-NEXT:    [[C1_13:%.*]] = call i1 @unknown(i32 0)
@@ -504,7 +500,6 @@ define void @test5() {
 ; CHECK:       innerLatch.3.1:
 ; CHECK-NEXT:    br i1 false, label [[INNERH_14]], label [[OUTERLATCH_1]], !llvm.loop [[LOOP6]]
 ; CHECK:       outerLatch.1:
-; CHECK-NEXT:    [[TMP6_1:%.*]] = add i32 [[TMP6]], 1
 ; CHECK-NEXT:    br label [[INNERH_29:%.*]]
 ; CHECK:       innerH.29:
 ; CHECK-NEXT:    [[C1_28:%.*]] = call i1 @unknown(i32 0)
@@ -539,7 +534,6 @@ define void @test5() {
 ; CHECK:       innerLatch.3.2:
 ; CHECK-NEXT:    br i1 false, label [[INNERH_29]], label [[OUTERLATCH_2]], !llvm.loop [[LOOP6]]
 ; CHECK:       outerLatch.2:
-; CHECK-NEXT:    [[TMP6_2:%.*]] = add i32 [[TMP6_1]], 1
 ; CHECK-NEXT:    br label [[INNERH_314:%.*]]
 ; CHECK:       innerH.314:
 ; CHECK-NEXT:    [[C1_313:%.*]] = call i1 @unknown(i32 0)
@@ -574,7 +568,7 @@ define void @test5() {
 ; CHECK:       innerLatch.3.3:
 ; CHECK-NEXT:    br i1 false, label [[INNERH_314]], label [[OUTERLATCH_3]], !llvm.loop [[LOOP6]]
 ; CHECK:       outerLatch.3:
-; CHECK-NEXT:    [[TMP6_3]] = add i32 [[TMP6_2]], 1
+; CHECK-NEXT:    [[TMP6_3]] = add i32 [[TMP4]], 4
 ; CHECK-NEXT:    [[TMP7_3:%.*]] = icmp sgt i32 [[TMP6_3]], 79
 ; CHECK-NEXT:    br i1 [[TMP7_3]], label [[OUTERLATCHEXIT_LOOPEXIT_UNR_LCSSA:%.*]], label [[OUTERH]], !llvm.loop [[LOOP8:![0-9]+]]
 ; CHECK:       outerLatchExit.loopexit.unr-lcssa:
@@ -703,17 +697,17 @@ define void @test6(i64 %start) {
 ; CHECK-NEXT:    [[C1_1:%.*]] = call i1 @unknown(i32 [[IV_I32_1]])
 ; CHECK-NEXT:    br i1 [[C1_1]], label [[LATCH_1:%.*]], label [[OTHEREXIT_LOOPEXIT]]
 ; CHECK:       latch.1:
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nsw i64 [[INDVARS_IV_NEXT]], 2
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nsw i64 [[INDVARS_IV]], 4
 ; CHECK-NEXT:    [[IV_I32_2:%.*]] = trunc i64 [[INDVARS_IV_NEXT_1]] to i32
 ; CHECK-NEXT:    [[C1_2:%.*]] = call i1 @unknown(i32 [[IV_I32_2]])
 ; CHECK-NEXT:    br i1 [[C1_2]], label [[LATCH_2:%.*]], label [[OTHEREXIT_LOOPEXIT]]
 ; CHECK:       latch.2:
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nsw i64 [[INDVARS_IV_NEXT_1]], 2
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nsw i64 [[INDVARS_IV]], 6
 ; CHECK-NEXT:    [[IV_I32_3:%.*]] = trunc i64 [[INDVARS_IV_NEXT_2]] to i32
 ; CHECK-NEXT:    [[C1_3:%.*]] = call i1 @unknown(i32 [[IV_I32_3]])
 ; CHECK-NEXT:    br i1 [[C1_3]], label [[LATCH_3]], label [[OTHEREXIT_LOOPEXIT]]
 ; CHECK:       latch.3:
-; CHECK-NEXT:    [[INDVARS_IV_NEXT_3]] = add nsw i64 [[INDVARS_IV_NEXT_2]], 2
+; CHECK-NEXT:    [[INDVARS_IV_NEXT_3]] = add nsw i64 [[INDVARS_IV]], 8
 ; CHECK-NEXT:    [[TMP9:%.*]] = icmp slt i64 [[INDVARS_IV_NEXT_3]], 616
 ; CHECK-NEXT:    br i1 [[TMP9]], label [[HEADER]], label [[LATCHEXIT_UNR_LCSSA:%.*]], !llvm.loop [[LOOP10:![0-9]+]]
 ; CHECK:       latchexit.unr-lcssa:

diff  --git a/llvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll b/llvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll
index e0a916f46306ad..6cad2e1c4a3246 100644
--- a/llvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll
+++ b/llvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll
@@ -34,64 +34,50 @@ define void @test1(i64 %trip, i1 %cond) {
 ; EPILOG:       exit3:
 ; EPILOG-NEXT:    ret void
 ; EPILOG:       loop_latch:
-; EPILOG-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.1, label %loop_exiting_bb1.1
 ; EPILOG:       loop_exiting_bb1.1:
 ; EPILOG-NEXT:    br i1 false, label %loop_exiting_bb2.1, label %exit1.loopexit
 ; EPILOG:       loop_exiting_bb2.1:
 ; EPILOG-NEXT:    br i1 false, label %loop_latch.1, label %exit3.loopexit
 ; EPILOG:       loop_latch.1:
-; EPILOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv_next, 1
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.2, label %loop_exiting_bb1.2
 ; EPILOG:       loop_exiting_bb1.2:
 ; EPILOG-NEXT:    br i1 false, label %loop_exiting_bb2.2, label %exit1.loopexit
 ; EPILOG:       loop_exiting_bb2.2:
 ; EPILOG-NEXT:    br i1 false, label %loop_latch.2, label %exit3.loopexit
 ; EPILOG:       loop_latch.2:
-; EPILOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv_next.1, 1
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.3, label %loop_exiting_bb1.3
 ; EPILOG:       loop_exiting_bb1.3:
 ; EPILOG-NEXT:    br i1 false, label %loop_exiting_bb2.3, label %exit1.loopexit
 ; EPILOG:       loop_exiting_bb2.3:
 ; EPILOG-NEXT:    br i1 false, label %loop_latch.3, label %exit3.loopexit
 ; EPILOG:       loop_latch.3:
-; EPILOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv_next.2, 1
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.4, label %loop_exiting_bb1.4
 ; EPILOG:       loop_exiting_bb1.4:
 ; EPILOG-NEXT:    br i1 false, label %loop_exiting_bb2.4, label %exit1.loopexit
 ; EPILOG:       loop_exiting_bb2.4:
 ; EPILOG-NEXT:    br i1 false, label %loop_latch.4, label %exit3.loopexit
 ; EPILOG:       loop_latch.4:
-; EPILOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv_next.3, 1
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.5, label %loop_exiting_bb1.5
 ; EPILOG:       loop_exiting_bb1.5:
 ; EPILOG-NEXT:    br i1 false, label %loop_exiting_bb2.5, label %exit1.loopexit
 ; EPILOG:       loop_exiting_bb2.5:
 ; EPILOG-NEXT:    br i1 false, label %loop_latch.5, label %exit3.loopexit
 ; EPILOG:       loop_latch.5:
-; EPILOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv_next.4, 1
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.6, label %loop_exiting_bb1.6
 ; EPILOG:       loop_exiting_bb1.6:
 ; EPILOG-NEXT:    br i1 false, label %loop_exiting_bb2.6, label %exit1.loopexit
 ; EPILOG:       loop_exiting_bb2.6:
 ; EPILOG-NEXT:    br i1 false, label %loop_latch.6, label %exit3.loopexit
 ; EPILOG:       loop_latch.6:
-; EPILOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv_next.5, 1
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.7, label %loop_exiting_bb1.7
 ; EPILOG:       loop_exiting_bb1.7:
 ; EPILOG-NEXT:    br i1 false, label %loop_exiting_bb2.7, label %exit1.loopexit
 ; EPILOG:       loop_exiting_bb2.7:
 ; EPILOG-NEXT:    br i1 false, label %loop_latch.7, label %exit3.loopexit
 ; EPILOG:       loop_latch.7:
-; EPILOG-NEXT:    %iv_next.7 = add i64 %iv_next.6, 1
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %iv_next.7 = add i64 %iv, 8
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp ne i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %loop_header, label %exit2.loopexit.unr-lcssa.loopexit
 ; EPILOG:       exit1.loopexit:
@@ -151,16 +137,14 @@ define void @test1(i64 %trip, i1 %cond) {
 ; EPILOG-BLOCK:       exit3:
 ; EPILOG-BLOCK-NEXT:    ret void
 ; EPILOG-BLOCK:       loop_latch:
-; EPILOG-BLOCK-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    br i1 %cond, label %loop_latch.1, label %loop_exiting_bb1.1
 ; EPILOG-BLOCK:       loop_exiting_bb1.1:
 ; EPILOG-BLOCK-NEXT:    br i1 false, label %loop_exiting_bb2.1, label %exit1.loopexit
 ; EPILOG-BLOCK:       loop_exiting_bb2.1:
 ; EPILOG-BLOCK-NEXT:    br i1 false, label %loop_latch.1, label %exit3.loopexit
 ; EPILOG-BLOCK:       loop_latch.1:
-; EPILOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv_next, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp ne i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %loop_header, label %exit2.loopexit.unr-lcssa.loopexit, !llvm.loop !0
 ; EPILOG-BLOCK:       exit1.loopexit:
@@ -231,56 +215,49 @@ define void @test1(i64 %trip, i1 %cond) {
 ; PROLOG:       exit3:
 ; PROLOG-NEXT:    ret void
 ; PROLOG:       loop_latch:
-; PROLOG-NEXT:    %iv_next = add i64 %iv, 1
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.1, label %loop_exiting_bb1.1
 ; PROLOG:       loop_exiting_bb1.1:
 ; PROLOG-NEXT:    br i1 false, label %loop_exiting_bb2.1, label %exit1.loopexit
 ; PROLOG:       loop_exiting_bb2.1:
 ; PROLOG-NEXT:    br i1 false, label %loop_latch.1, label %exit3.loopexit
 ; PROLOG:       loop_latch.1:
-; PROLOG-NEXT:    %iv_next.1 = add i64 %iv_next, 1
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.2, label %loop_exiting_bb1.2
 ; PROLOG:       loop_exiting_bb1.2:
 ; PROLOG-NEXT:    br i1 false, label %loop_exiting_bb2.2, label %exit1.loopexit
 ; PROLOG:       loop_exiting_bb2.2:
 ; PROLOG-NEXT:    br i1 false, label %loop_latch.2, label %exit3.loopexit
 ; PROLOG:       loop_latch.2:
-; PROLOG-NEXT:    %iv_next.2 = add i64 %iv_next.1, 1
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.3, label %loop_exiting_bb1.3
 ; PROLOG:       loop_exiting_bb1.3:
 ; PROLOG-NEXT:    br i1 false, label %loop_exiting_bb2.3, label %exit1.loopexit
 ; PROLOG:       loop_exiting_bb2.3:
 ; PROLOG-NEXT:    br i1 false, label %loop_latch.3, label %exit3.loopexit
 ; PROLOG:       loop_latch.3:
-; PROLOG-NEXT:    %iv_next.3 = add i64 %iv_next.2, 1
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.4, label %loop_exiting_bb1.4
 ; PROLOG:       loop_exiting_bb1.4:
 ; PROLOG-NEXT:    br i1 false, label %loop_exiting_bb2.4, label %exit1.loopexit
 ; PROLOG:       loop_exiting_bb2.4:
 ; PROLOG-NEXT:    br i1 false, label %loop_latch.4, label %exit3.loopexit
 ; PROLOG:       loop_latch.4:
-; PROLOG-NEXT:    %iv_next.4 = add i64 %iv_next.3, 1
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.5, label %loop_exiting_bb1.5
 ; PROLOG:       loop_exiting_bb1.5:
 ; PROLOG-NEXT:    br i1 false, label %loop_exiting_bb2.5, label %exit1.loopexit
 ; PROLOG:       loop_exiting_bb2.5:
 ; PROLOG-NEXT:    br i1 false, label %loop_latch.5, label %exit3.loopexit
 ; PROLOG:       loop_latch.5:
-; PROLOG-NEXT:    %iv_next.5 = add i64 %iv_next.4, 1
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.6, label %loop_exiting_bb1.6
 ; PROLOG:       loop_exiting_bb1.6:
 ; PROLOG-NEXT:    br i1 false, label %loop_exiting_bb2.6, label %exit1.loopexit
 ; PROLOG:       loop_exiting_bb2.6:
 ; PROLOG-NEXT:    br i1 false, label %loop_latch.6, label %exit3.loopexit
 ; PROLOG:       loop_latch.6:
-; PROLOG-NEXT:    %iv_next.6 = add i64 %iv_next.5, 1
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.7, label %loop_exiting_bb1.7
 ; PROLOG:       loop_exiting_bb1.7:
 ; PROLOG-NEXT:    br i1 false, label %loop_exiting_bb2.7, label %exit1.loopexit
 ; PROLOG:       loop_exiting_bb2.7:
 ; PROLOG-NEXT:    br i1 false, label %loop_latch.7, label %exit3.loopexit
 ; PROLOG:       loop_latch.7:
-; PROLOG-NEXT:    %iv_next.7 = add i64 %iv_next.6, 1
+; PROLOG-NEXT:    %iv_next.7 = add i64 %iv, 8
 ; PROLOG-NEXT:    %cmp.7 = icmp ne i64 %iv_next.7, %trip
 ; PROLOG-NEXT:    br i1 %cmp.7, label %loop_header, label %exit2.loopexit.unr-lcssa
 ; PROLOG:       exit1.loopexit:
@@ -329,14 +306,13 @@ define void @test1(i64 %trip, i1 %cond) {
 ; PROLOG-BLOCK:       exit3:
 ; PROLOG-BLOCK-NEXT:    ret void
 ; PROLOG-BLOCK:       loop_latch:
-; PROLOG-BLOCK-NEXT:    %iv_next = add i64 %iv, 1
 ; PROLOG-BLOCK-NEXT:    br i1 %cond, label %loop_latch.1, label %loop_exiting_bb1.1
 ; PROLOG-BLOCK:       loop_exiting_bb1.1:
 ; PROLOG-BLOCK-NEXT:    br i1 false, label %loop_exiting_bb2.1, label %exit1.loopexit
 ; PROLOG-BLOCK:       loop_exiting_bb2.1:
 ; PROLOG-BLOCK-NEXT:    br i1 false, label %loop_latch.1, label %exit3.loopexit
 ; PROLOG-BLOCK:       loop_latch.1:
-; PROLOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv_next, 1
+; PROLOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv, 2
 ; PROLOG-BLOCK-NEXT:    %cmp.1 = icmp ne i64 %iv_next.1, %trip
 ; PROLOG-BLOCK-NEXT:    br i1 %cmp.1, label %loop_header, label %exit2.loopexit.unr-lcssa, !llvm.loop !0
 ; PROLOG-BLOCK:       exit1.loopexit:
@@ -407,7 +383,6 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; EPILOG-NEXT:    %3 = load i32, ptr %arrayidx, align 4
 ; EPILOG-NEXT:    %add = add nsw i32 %3, %sum.02
 ; EPILOG-NEXT:    %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.1
 ; EPILOG:       for.exiting_block.1:
 ; EPILOG-NEXT:    %cmp.1 = icmp eq i64 %n, 42
@@ -416,8 +391,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; EPILOG-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; EPILOG-NEXT:    %4 = load i32, ptr %arrayidx.1, align 4
 ; EPILOG-NEXT:    %add.1 = add nsw i32 %4, %add
-; EPILOG-NEXT:    %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.next, 1
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
+; EPILOG-NEXT:    %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
 ; EPILOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.2
 ; EPILOG:       for.exiting_block.2:
 ; EPILOG-NEXT:    %cmp.2 = icmp eq i64 %n, 42
@@ -426,8 +400,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; EPILOG-NEXT:    %arrayidx.2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.1
 ; EPILOG-NEXT:    %5 = load i32, ptr %arrayidx.2, align 4
 ; EPILOG-NEXT:    %add.2 = add nsw i32 %5, %add.1
-; EPILOG-NEXT:    %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.next.1, 1
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
+; EPILOG-NEXT:    %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
 ; EPILOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.3
 ; EPILOG:       for.exiting_block.3:
 ; EPILOG-NEXT:    %cmp.3 = icmp eq i64 %n, 42
@@ -436,8 +409,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; EPILOG-NEXT:    %arrayidx.3 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.2
 ; EPILOG-NEXT:    %6 = load i32, ptr %arrayidx.3, align 4
 ; EPILOG-NEXT:    %add.3 = add nsw i32 %6, %add.2
-; EPILOG-NEXT:    %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.next.2, 1
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
+; EPILOG-NEXT:    %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
 ; EPILOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.4
 ; EPILOG:       for.exiting_block.4:
 ; EPILOG-NEXT:    %cmp.4 = icmp eq i64 %n, 42
@@ -446,8 +418,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; EPILOG-NEXT:    %arrayidx.4 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.3
 ; EPILOG-NEXT:    %7 = load i32, ptr %arrayidx.4, align 4
 ; EPILOG-NEXT:    %add.4 = add nsw i32 %7, %add.3
-; EPILOG-NEXT:    %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv.next.3, 1
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
+; EPILOG-NEXT:    %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5
 ; EPILOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.5
 ; EPILOG:       for.exiting_block.5:
 ; EPILOG-NEXT:    %cmp.5 = icmp eq i64 %n, 42
@@ -456,8 +427,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; EPILOG-NEXT:    %arrayidx.5 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.4
 ; EPILOG-NEXT:    %8 = load i32, ptr %arrayidx.5, align 4
 ; EPILOG-NEXT:    %add.5 = add nsw i32 %8, %add.4
-; EPILOG-NEXT:    %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv.next.4, 1
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
+; EPILOG-NEXT:    %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv, 6
 ; EPILOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.6
 ; EPILOG:       for.exiting_block.6:
 ; EPILOG-NEXT:    %cmp.6 = icmp eq i64 %n, 42
@@ -466,8 +436,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; EPILOG-NEXT:    %arrayidx.6 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.5
 ; EPILOG-NEXT:    %9 = load i32, ptr %arrayidx.6, align 4
 ; EPILOG-NEXT:    %add.6 = add nsw i32 %9, %add.5
-; EPILOG-NEXT:    %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv.next.5, 1
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
+; EPILOG-NEXT:    %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv, 7
 ; EPILOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.7
 ; EPILOG:       for.exiting_block.7:
 ; EPILOG-NEXT:    %cmp.7 = icmp eq i64 %n, 42
@@ -476,8 +445,8 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; EPILOG-NEXT:    %arrayidx.7 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.6
 ; EPILOG-NEXT:    %10 = load i32, ptr %arrayidx.7, align 4
 ; EPILOG-NEXT:    %add.7 = add nsw i32 %10, %add.6
-; EPILOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv.next.6, 1
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv, 8
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %for.end.unr-lcssa.loopexit, label %header
 ; EPILOG:       for.end.unr-lcssa.loopexit:
@@ -549,7 +518,6 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; EPILOG-BLOCK-NEXT:    %3 = load i32, ptr %arrayidx, align 4
 ; EPILOG-BLOCK-NEXT:    %add = add nsw i32 %3, %sum.02
 ; EPILOG-BLOCK-NEXT:    %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.1
 ; EPILOG-BLOCK:       for.exiting_block.1:
 ; EPILOG-BLOCK-NEXT:    %cmp.1 = icmp eq i64 %n, 42
@@ -558,8 +526,8 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; EPILOG-BLOCK-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; EPILOG-BLOCK-NEXT:    %4 = load i32, ptr %arrayidx.1, align 4
 ; EPILOG-BLOCK-NEXT:    %add.1 = add nsw i32 %4, %add
-; EPILOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %for.end.unr-lcssa.loopexit, label %header, !llvm.loop !2
 ; EPILOG-BLOCK:       for.end.unr-lcssa.loopexit:
@@ -654,7 +622,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; PROLOG-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; PROLOG-NEXT:    %5 = load i32, ptr %arrayidx.1, align 4
 ; PROLOG-NEXT:    %add.1 = add nsw i32 %5, %add
-; PROLOG-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
+; PROLOG-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
 ; PROLOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.2
 ; PROLOG:       for.exiting_block.2:
 ; PROLOG-NEXT:    %cmp.2 = icmp eq i64 %n, 42
@@ -663,7 +631,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; PROLOG-NEXT:    %arrayidx.2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.1
 ; PROLOG-NEXT:    %6 = load i32, ptr %arrayidx.2, align 4
 ; PROLOG-NEXT:    %add.2 = add nsw i32 %6, %add.1
-; PROLOG-NEXT:    %indvars.iv.next.2 = add i64 %indvars.iv.next.1, 1
+; PROLOG-NEXT:    %indvars.iv.next.2 = add i64 %indvars.iv, 3
 ; PROLOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.3
 ; PROLOG:       for.exiting_block.3:
 ; PROLOG-NEXT:    %cmp.3 = icmp eq i64 %n, 42
@@ -672,7 +640,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; PROLOG-NEXT:    %arrayidx.3 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.2
 ; PROLOG-NEXT:    %7 = load i32, ptr %arrayidx.3, align 4
 ; PROLOG-NEXT:    %add.3 = add nsw i32 %7, %add.2
-; PROLOG-NEXT:    %indvars.iv.next.3 = add i64 %indvars.iv.next.2, 1
+; PROLOG-NEXT:    %indvars.iv.next.3 = add i64 %indvars.iv, 4
 ; PROLOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.4
 ; PROLOG:       for.exiting_block.4:
 ; PROLOG-NEXT:    %cmp.4 = icmp eq i64 %n, 42
@@ -681,7 +649,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; PROLOG-NEXT:    %arrayidx.4 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.3
 ; PROLOG-NEXT:    %8 = load i32, ptr %arrayidx.4, align 4
 ; PROLOG-NEXT:    %add.4 = add nsw i32 %8, %add.3
-; PROLOG-NEXT:    %indvars.iv.next.4 = add i64 %indvars.iv.next.3, 1
+; PROLOG-NEXT:    %indvars.iv.next.4 = add i64 %indvars.iv, 5
 ; PROLOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.5
 ; PROLOG:       for.exiting_block.5:
 ; PROLOG-NEXT:    %cmp.5 = icmp eq i64 %n, 42
@@ -690,7 +658,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; PROLOG-NEXT:    %arrayidx.5 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.4
 ; PROLOG-NEXT:    %9 = load i32, ptr %arrayidx.5, align 4
 ; PROLOG-NEXT:    %add.5 = add nsw i32 %9, %add.4
-; PROLOG-NEXT:    %indvars.iv.next.5 = add i64 %indvars.iv.next.4, 1
+; PROLOG-NEXT:    %indvars.iv.next.5 = add i64 %indvars.iv, 6
 ; PROLOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.6
 ; PROLOG:       for.exiting_block.6:
 ; PROLOG-NEXT:    %cmp.6 = icmp eq i64 %n, 42
@@ -699,7 +667,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; PROLOG-NEXT:    %arrayidx.6 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.5
 ; PROLOG-NEXT:    %10 = load i32, ptr %arrayidx.6, align 4
 ; PROLOG-NEXT:    %add.6 = add nsw i32 %10, %add.5
-; PROLOG-NEXT:    %indvars.iv.next.6 = add i64 %indvars.iv.next.5, 1
+; PROLOG-NEXT:    %indvars.iv.next.6 = add i64 %indvars.iv, 7
 ; PROLOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.7
 ; PROLOG:       for.exiting_block.7:
 ; PROLOG-NEXT:    %cmp.7 = icmp eq i64 %n, 42
@@ -708,7 +676,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; PROLOG-NEXT:    %arrayidx.7 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.6
 ; PROLOG-NEXT:    %11 = load i32, ptr %arrayidx.7, align 4
 ; PROLOG-NEXT:    %add.7 = add nsw i32 %11, %add.6
-; PROLOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv.next.6, 1
+; PROLOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv, 8
 ; PROLOG-NEXT:    %exitcond.7 = icmp eq i64 %indvars.iv.next.7, %n
 ; PROLOG-NEXT:    br i1 %exitcond.7, label %for.end.unr-lcssa, label %header
 ; PROLOG:       for.end.unr-lcssa:
@@ -772,7 +740,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; PROLOG-BLOCK-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; PROLOG-BLOCK-NEXT:    %5 = load i32, ptr %arrayidx.1, align 4
 ; PROLOG-BLOCK-NEXT:    %add.1 = add nsw i32 %5, %add
-; PROLOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
+; PROLOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
 ; PROLOG-BLOCK-NEXT:    %exitcond.1 = icmp eq i64 %indvars.iv.next.1, %n
 ; PROLOG-BLOCK-NEXT:    br i1 %exitcond.1, label %for.end.unr-lcssa, label %header, !llvm.loop !2
 ; PROLOG-BLOCK:       for.end.unr-lcssa:
@@ -849,9 +817,7 @@ define void @test3(i64 %trip, i64 %add) {
 ; EPILOG:       exit3:
 ; EPILOG-NEXT:    ret void
 ; EPILOG:       loop_latch:
-; EPILOG-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
 ; EPILOG-NEXT:    %sum.next = add i64 %sum, %add
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    br i1 undef, label %loop_latch.1, label %loop_exiting_bb1.1
 ; EPILOG:       loop_exiting_bb1.1:
 ; EPILOG-NEXT:    switch i64 %sum.next, label %loop_latch.1 [
@@ -859,9 +825,7 @@ define void @test3(i64 %trip, i64 %add) {
 ; EPILOG-NEXT:    i64 42, label %exit3.loopexit
 ; EPILOG-NEXT:    ]
 ; EPILOG:       loop_latch.1:
-; EPILOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv_next, 1
 ; EPILOG-NEXT:    %sum.next.1 = add i64 %sum.next, %add
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
 ; EPILOG-NEXT:    br i1 undef, label %loop_latch.2, label %loop_exiting_bb1.2
 ; EPILOG:       loop_exiting_bb1.2:
 ; EPILOG-NEXT:    switch i64 %sum.next.1, label %loop_latch.2 [
@@ -869,9 +833,7 @@ define void @test3(i64 %trip, i64 %add) {
 ; EPILOG-NEXT:    i64 42, label %exit3.loopexit
 ; EPILOG-NEXT:    ]
 ; EPILOG:       loop_latch.2:
-; EPILOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv_next.1, 1
 ; EPILOG-NEXT:    %sum.next.2 = add i64 %sum.next.1, %add
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
 ; EPILOG-NEXT:    br i1 undef, label %loop_latch.3, label %loop_exiting_bb1.3
 ; EPILOG:       loop_exiting_bb1.3:
 ; EPILOG-NEXT:    switch i64 %sum.next.2, label %loop_latch.3 [
@@ -879,9 +841,7 @@ define void @test3(i64 %trip, i64 %add) {
 ; EPILOG-NEXT:    i64 42, label %exit3.loopexit
 ; EPILOG-NEXT:    ]
 ; EPILOG:       loop_latch.3:
-; EPILOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv_next.2, 1
 ; EPILOG-NEXT:    %sum.next.3 = add i64 %sum.next.2, %add
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
 ; EPILOG-NEXT:    br i1 undef, label %loop_latch.4, label %loop_exiting_bb1.4
 ; EPILOG:       loop_exiting_bb1.4:
 ; EPILOG-NEXT:    switch i64 %sum.next.3, label %loop_latch.4 [
@@ -889,9 +849,7 @@ define void @test3(i64 %trip, i64 %add) {
 ; EPILOG-NEXT:    i64 42, label %exit3.loopexit
 ; EPILOG-NEXT:    ]
 ; EPILOG:       loop_latch.4:
-; EPILOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv_next.3, 1
 ; EPILOG-NEXT:    %sum.next.4 = add i64 %sum.next.3, %add
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
 ; EPILOG-NEXT:    br i1 undef, label %loop_latch.5, label %loop_exiting_bb1.5
 ; EPILOG:       loop_exiting_bb1.5:
 ; EPILOG-NEXT:    switch i64 %sum.next.4, label %loop_latch.5 [
@@ -899,9 +857,7 @@ define void @test3(i64 %trip, i64 %add) {
 ; EPILOG-NEXT:    i64 42, label %exit3.loopexit
 ; EPILOG-NEXT:    ]
 ; EPILOG:       loop_latch.5:
-; EPILOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv_next.4, 1
 ; EPILOG-NEXT:    %sum.next.5 = add i64 %sum.next.4, %add
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
 ; EPILOG-NEXT:    br i1 undef, label %loop_latch.6, label %loop_exiting_bb1.6
 ; EPILOG:       loop_exiting_bb1.6:
 ; EPILOG-NEXT:    switch i64 %sum.next.5, label %loop_latch.6 [
@@ -909,9 +865,7 @@ define void @test3(i64 %trip, i64 %add) {
 ; EPILOG-NEXT:    i64 42, label %exit3.loopexit
 ; EPILOG-NEXT:    ]
 ; EPILOG:       loop_latch.6:
-; EPILOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv_next.5, 1
 ; EPILOG-NEXT:    %sum.next.6 = add i64 %sum.next.5, %add
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
 ; EPILOG-NEXT:    br i1 undef, label %loop_latch.7, label %loop_exiting_bb1.7
 ; EPILOG:       loop_exiting_bb1.7:
 ; EPILOG-NEXT:    switch i64 %sum.next.6, label %loop_latch.7 [
@@ -919,9 +873,9 @@ define void @test3(i64 %trip, i64 %add) {
 ; EPILOG-NEXT:    i64 42, label %exit3.loopexit
 ; EPILOG-NEXT:    ]
 ; EPILOG:       loop_latch.7:
-; EPILOG-NEXT:    %iv_next.7 = add nuw nsw i64 %iv_next.6, 1
+; EPILOG-NEXT:    %iv_next.7 = add nuw nsw i64 %iv, 8
 ; EPILOG-NEXT:    %sum.next.7 = add i64 %sum.next.6, %add
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp ne i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %loop_header, label %exit2.loopexit.unr-lcssa.loopexit
 ; EPILOG:       exit1.loopexit:
@@ -988,9 +942,7 @@ define void @test3(i64 %trip, i64 %add) {
 ; EPILOG-BLOCK:       exit3:
 ; EPILOG-BLOCK-NEXT:    ret void
 ; EPILOG-BLOCK:       loop_latch:
-; EPILOG-BLOCK-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
 ; EPILOG-BLOCK-NEXT:    %sum.next = add i64 %sum, %add
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    br i1 undef, label %loop_latch.1, label %loop_exiting_bb1.1
 ; EPILOG-BLOCK:       loop_exiting_bb1.1:
 ; EPILOG-BLOCK-NEXT:    switch i64 %sum.next, label %loop_latch.1 [
@@ -998,9 +950,9 @@ define void @test3(i64 %trip, i64 %add) {
 ; EPILOG-BLOCK-NEXT:    i64 42, label %exit3.loopexit
 ; EPILOG-BLOCK-NEXT:    ]
 ; EPILOG-BLOCK:       loop_latch.1:
-; EPILOG-BLOCK-NEXT:    %iv_next.1 = add nuw nsw i64 %iv_next, 1
+; EPILOG-BLOCK-NEXT:    %iv_next.1 = add nuw nsw i64 %iv, 2
 ; EPILOG-BLOCK-NEXT:    %sum.next.1 = add i64 %sum.next, %add
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp ne i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %loop_header, label %exit2.loopexit.unr-lcssa.loopexit, !llvm.loop !3
 ; EPILOG-BLOCK:       exit1.loopexit:
@@ -1081,7 +1033,6 @@ define void @test3(i64 %trip, i64 %add) {
 ; PROLOG:       exit3:
 ; PROLOG-NEXT:    ret void
 ; PROLOG:       loop_latch:
-; PROLOG-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
 ; PROLOG-NEXT:    %sum.next = add i64 %sum, %add
 ; PROLOG-NEXT:    br i1 undef, label %loop_latch.1, label %loop_exiting_bb1.1
 ; PROLOG:       loop_exiting_bb1.1:
@@ -1090,7 +1041,6 @@ define void @test3(i64 %trip, i64 %add) {
 ; PROLOG-NEXT:    i64 42, label %exit3.loopexit
 ; PROLOG-NEXT:    ]
 ; PROLOG:       loop_latch.1:
-; PROLOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv_next, 1
 ; PROLOG-NEXT:    %sum.next.1 = add i64 %sum.next, %add
 ; PROLOG-NEXT:    br i1 undef, label %loop_latch.2, label %loop_exiting_bb1.2
 ; PROLOG:       loop_exiting_bb1.2:
@@ -1099,7 +1049,6 @@ define void @test3(i64 %trip, i64 %add) {
 ; PROLOG-NEXT:    i64 42, label %exit3.loopexit
 ; PROLOG-NEXT:    ]
 ; PROLOG:       loop_latch.2:
-; PROLOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv_next.1, 1
 ; PROLOG-NEXT:    %sum.next.2 = add i64 %sum.next.1, %add
 ; PROLOG-NEXT:    br i1 undef, label %loop_latch.3, label %loop_exiting_bb1.3
 ; PROLOG:       loop_exiting_bb1.3:
@@ -1108,7 +1057,6 @@ define void @test3(i64 %trip, i64 %add) {
 ; PROLOG-NEXT:    i64 42, label %exit3.loopexit
 ; PROLOG-NEXT:    ]
 ; PROLOG:       loop_latch.3:
-; PROLOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv_next.2, 1
 ; PROLOG-NEXT:    %sum.next.3 = add i64 %sum.next.2, %add
 ; PROLOG-NEXT:    br i1 undef, label %loop_latch.4, label %loop_exiting_bb1.4
 ; PROLOG:       loop_exiting_bb1.4:
@@ -1117,7 +1065,6 @@ define void @test3(i64 %trip, i64 %add) {
 ; PROLOG-NEXT:    i64 42, label %exit3.loopexit
 ; PROLOG-NEXT:    ]
 ; PROLOG:       loop_latch.4:
-; PROLOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv_next.3, 1
 ; PROLOG-NEXT:    %sum.next.4 = add i64 %sum.next.3, %add
 ; PROLOG-NEXT:    br i1 undef, label %loop_latch.5, label %loop_exiting_bb1.5
 ; PROLOG:       loop_exiting_bb1.5:
@@ -1126,7 +1073,6 @@ define void @test3(i64 %trip, i64 %add) {
 ; PROLOG-NEXT:    i64 42, label %exit3.loopexit
 ; PROLOG-NEXT:    ]
 ; PROLOG:       loop_latch.5:
-; PROLOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv_next.4, 1
 ; PROLOG-NEXT:    %sum.next.5 = add i64 %sum.next.4, %add
 ; PROLOG-NEXT:    br i1 undef, label %loop_latch.6, label %loop_exiting_bb1.6
 ; PROLOG:       loop_exiting_bb1.6:
@@ -1135,7 +1081,6 @@ define void @test3(i64 %trip, i64 %add) {
 ; PROLOG-NEXT:    i64 42, label %exit3.loopexit
 ; PROLOG-NEXT:    ]
 ; PROLOG:       loop_latch.6:
-; PROLOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv_next.5, 1
 ; PROLOG-NEXT:    %sum.next.6 = add i64 %sum.next.5, %add
 ; PROLOG-NEXT:    br i1 undef, label %loop_latch.7, label %loop_exiting_bb1.7
 ; PROLOG:       loop_exiting_bb1.7:
@@ -1144,7 +1089,7 @@ define void @test3(i64 %trip, i64 %add) {
 ; PROLOG-NEXT:    i64 42, label %exit3.loopexit
 ; PROLOG-NEXT:    ]
 ; PROLOG:       loop_latch.7:
-; PROLOG-NEXT:    %iv_next.7 = add nuw nsw i64 %iv_next.6, 1
+; PROLOG-NEXT:    %iv_next.7 = add nuw nsw i64 %iv, 8
 ; PROLOG-NEXT:    %sum.next.7 = add i64 %sum.next.6, %add
 ; PROLOG-NEXT:    %cmp.7 = icmp ne i64 %iv_next.7, %trip
 ; PROLOG-NEXT:    br i1 %cmp.7, label %loop_header, label %exit2.loopexit.unr-lcssa
@@ -1198,7 +1143,6 @@ define void @test3(i64 %trip, i64 %add) {
 ; PROLOG-BLOCK:       exit3:
 ; PROLOG-BLOCK-NEXT:    ret void
 ; PROLOG-BLOCK:       loop_latch:
-; PROLOG-BLOCK-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
 ; PROLOG-BLOCK-NEXT:    %sum.next = add i64 %sum, %add
 ; PROLOG-BLOCK-NEXT:    br i1 undef, label %loop_latch.1, label %loop_exiting_bb1.1
 ; PROLOG-BLOCK:       loop_exiting_bb1.1:
@@ -1207,7 +1151,7 @@ define void @test3(i64 %trip, i64 %add) {
 ; PROLOG-BLOCK-NEXT:    i64 42, label %exit3.loopexit
 ; PROLOG-BLOCK-NEXT:    ]
 ; PROLOG-BLOCK:       loop_latch.1:
-; PROLOG-BLOCK-NEXT:    %iv_next.1 = add nuw nsw i64 %iv_next, 1
+; PROLOG-BLOCK-NEXT:    %iv_next.1 = add nuw nsw i64 %iv, 2
 ; PROLOG-BLOCK-NEXT:    %sum.next.1 = add i64 %sum.next, %add
 ; PROLOG-BLOCK-NEXT:    %cmp.1 = icmp ne i64 %iv_next.1, %trip
 ; PROLOG-BLOCK-NEXT:    br i1 %cmp.1, label %loop_header, label %exit2.loopexit.unr-lcssa, !llvm.loop !3
@@ -1277,7 +1221,6 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %3 = load i32, ptr %arrayidx, align 4
 ; EPILOG-NEXT:    %add = add nsw i32 %3, %sum.02
 ; EPILOG-NEXT:    %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    br i1 %cond, label %latchExit.epilog-lcssa.loopexit, label %for.exiting_block.1
 ; EPILOG:       for.exiting_block.1:
 ; EPILOG-NEXT:    %cmp.1 = icmp eq i64 %n, 42
@@ -1286,8 +1229,7 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; EPILOG-NEXT:    %4 = load i32, ptr %arrayidx.1, align 4
 ; EPILOG-NEXT:    %add.1 = add nsw i32 %4, %add
-; EPILOG-NEXT:    %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.next, 1
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
+; EPILOG-NEXT:    %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
 ; EPILOG-NEXT:    br i1 %cond, label %latchExit.epilog-lcssa.loopexit, label %for.exiting_block.2
 ; EPILOG:       for.exiting_block.2:
 ; EPILOG-NEXT:    %cmp.2 = icmp eq i64 %n, 42
@@ -1296,8 +1238,7 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.1
 ; EPILOG-NEXT:    %5 = load i32, ptr %arrayidx.2, align 4
 ; EPILOG-NEXT:    %add.2 = add nsw i32 %5, %add.1
-; EPILOG-NEXT:    %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.next.1, 1
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
+; EPILOG-NEXT:    %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
 ; EPILOG-NEXT:    br i1 %cond, label %latchExit.epilog-lcssa.loopexit, label %for.exiting_block.3
 ; EPILOG:       for.exiting_block.3:
 ; EPILOG-NEXT:    %cmp.3 = icmp eq i64 %n, 42
@@ -1306,8 +1247,7 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.3 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.2
 ; EPILOG-NEXT:    %6 = load i32, ptr %arrayidx.3, align 4
 ; EPILOG-NEXT:    %add.3 = add nsw i32 %6, %add.2
-; EPILOG-NEXT:    %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.next.2, 1
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
+; EPILOG-NEXT:    %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
 ; EPILOG-NEXT:    br i1 %cond, label %latchExit.epilog-lcssa.loopexit, label %for.exiting_block.4
 ; EPILOG:       for.exiting_block.4:
 ; EPILOG-NEXT:    %cmp.4 = icmp eq i64 %n, 42
@@ -1316,8 +1256,7 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.4 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.3
 ; EPILOG-NEXT:    %7 = load i32, ptr %arrayidx.4, align 4
 ; EPILOG-NEXT:    %add.4 = add nsw i32 %7, %add.3
-; EPILOG-NEXT:    %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv.next.3, 1
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
+; EPILOG-NEXT:    %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5
 ; EPILOG-NEXT:    br i1 %cond, label %latchExit.epilog-lcssa.loopexit, label %for.exiting_block.5
 ; EPILOG:       for.exiting_block.5:
 ; EPILOG-NEXT:    %cmp.5 = icmp eq i64 %n, 42
@@ -1326,8 +1265,7 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.5 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.4
 ; EPILOG-NEXT:    %8 = load i32, ptr %arrayidx.5, align 4
 ; EPILOG-NEXT:    %add.5 = add nsw i32 %8, %add.4
-; EPILOG-NEXT:    %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv.next.4, 1
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
+; EPILOG-NEXT:    %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv, 6
 ; EPILOG-NEXT:    br i1 %cond, label %latchExit.epilog-lcssa.loopexit, label %for.exiting_block.6
 ; EPILOG:       for.exiting_block.6:
 ; EPILOG-NEXT:    %cmp.6 = icmp eq i64 %n, 42
@@ -1336,8 +1274,7 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.6 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.5
 ; EPILOG-NEXT:    %9 = load i32, ptr %arrayidx.6, align 4
 ; EPILOG-NEXT:    %add.6 = add nsw i32 %9, %add.5
-; EPILOG-NEXT:    %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv.next.5, 1
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
+; EPILOG-NEXT:    %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv, 7
 ; EPILOG-NEXT:    br i1 %cond, label %latchExit.epilog-lcssa.loopexit, label %for.exiting_block.7
 ; EPILOG:       for.exiting_block.7:
 ; EPILOG-NEXT:    %cmp.7 = icmp eq i64 %n, 42
@@ -1346,8 +1283,8 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.7 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.6
 ; EPILOG-NEXT:    %10 = load i32, ptr %arrayidx.7, align 4
 ; EPILOG-NEXT:    %add.7 = add nsw i32 %10, %add.6
-; EPILOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv.next.6, 1
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv, 8
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %latchExit.unr-lcssa.loopexit, label %header
 ; EPILOG:       latchExit.unr-lcssa.loopexit:
@@ -1422,7 +1359,6 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-BLOCK-NEXT:    %3 = load i32, ptr %arrayidx, align 4
 ; EPILOG-BLOCK-NEXT:    %add = add nsw i32 %3, %sum.02
 ; EPILOG-BLOCK-NEXT:    %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    br i1 %cond, label %latchExit.epilog-lcssa.loopexit, label %for.exiting_block.1
 ; EPILOG-BLOCK:       for.exiting_block.1:
 ; EPILOG-BLOCK-NEXT:    %cmp.1 = icmp eq i64 %n, 42
@@ -1431,8 +1367,8 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-BLOCK-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; EPILOG-BLOCK-NEXT:    %4 = load i32, ptr %arrayidx.1, align 4
 ; EPILOG-BLOCK-NEXT:    %add.1 = add nsw i32 %4, %add
-; EPILOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %latchExit.unr-lcssa.loopexit, label %header, !llvm.loop !4
 ; EPILOG-BLOCK:       latchExit.unr-lcssa.loopexit:
@@ -1531,7 +1467,7 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; PROLOG-NEXT:    %5 = load i32, ptr %arrayidx.1, align 4
 ; PROLOG-NEXT:    %add.1 = add nsw i32 %5, %add
-; PROLOG-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
+; PROLOG-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
 ; PROLOG-NEXT:    br i1 %cond, label %latchExit.unr-lcssa.loopexit, label %for.exiting_block.2
 ; PROLOG:       for.exiting_block.2:
 ; PROLOG-NEXT:    %cmp.2 = icmp eq i64 %n, 42
@@ -1540,7 +1476,7 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.1
 ; PROLOG-NEXT:    %6 = load i32, ptr %arrayidx.2, align 4
 ; PROLOG-NEXT:    %add.2 = add nsw i32 %6, %add.1
-; PROLOG-NEXT:    %indvars.iv.next.2 = add i64 %indvars.iv.next.1, 1
+; PROLOG-NEXT:    %indvars.iv.next.2 = add i64 %indvars.iv, 3
 ; PROLOG-NEXT:    br i1 %cond, label %latchExit.unr-lcssa.loopexit, label %for.exiting_block.3
 ; PROLOG:       for.exiting_block.3:
 ; PROLOG-NEXT:    %cmp.3 = icmp eq i64 %n, 42
@@ -1549,7 +1485,7 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.3 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.2
 ; PROLOG-NEXT:    %7 = load i32, ptr %arrayidx.3, align 4
 ; PROLOG-NEXT:    %add.3 = add nsw i32 %7, %add.2
-; PROLOG-NEXT:    %indvars.iv.next.3 = add i64 %indvars.iv.next.2, 1
+; PROLOG-NEXT:    %indvars.iv.next.3 = add i64 %indvars.iv, 4
 ; PROLOG-NEXT:    br i1 %cond, label %latchExit.unr-lcssa.loopexit, label %for.exiting_block.4
 ; PROLOG:       for.exiting_block.4:
 ; PROLOG-NEXT:    %cmp.4 = icmp eq i64 %n, 42
@@ -1558,7 +1494,7 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.4 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.3
 ; PROLOG-NEXT:    %8 = load i32, ptr %arrayidx.4, align 4
 ; PROLOG-NEXT:    %add.4 = add nsw i32 %8, %add.3
-; PROLOG-NEXT:    %indvars.iv.next.4 = add i64 %indvars.iv.next.3, 1
+; PROLOG-NEXT:    %indvars.iv.next.4 = add i64 %indvars.iv, 5
 ; PROLOG-NEXT:    br i1 %cond, label %latchExit.unr-lcssa.loopexit, label %for.exiting_block.5
 ; PROLOG:       for.exiting_block.5:
 ; PROLOG-NEXT:    %cmp.5 = icmp eq i64 %n, 42
@@ -1567,7 +1503,7 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.5 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.4
 ; PROLOG-NEXT:    %9 = load i32, ptr %arrayidx.5, align 4
 ; PROLOG-NEXT:    %add.5 = add nsw i32 %9, %add.4
-; PROLOG-NEXT:    %indvars.iv.next.5 = add i64 %indvars.iv.next.4, 1
+; PROLOG-NEXT:    %indvars.iv.next.5 = add i64 %indvars.iv, 6
 ; PROLOG-NEXT:    br i1 %cond, label %latchExit.unr-lcssa.loopexit, label %for.exiting_block.6
 ; PROLOG:       for.exiting_block.6:
 ; PROLOG-NEXT:    %cmp.6 = icmp eq i64 %n, 42
@@ -1576,7 +1512,7 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.6 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.5
 ; PROLOG-NEXT:    %10 = load i32, ptr %arrayidx.6, align 4
 ; PROLOG-NEXT:    %add.6 = add nsw i32 %10, %add.5
-; PROLOG-NEXT:    %indvars.iv.next.6 = add i64 %indvars.iv.next.5, 1
+; PROLOG-NEXT:    %indvars.iv.next.6 = add i64 %indvars.iv, 7
 ; PROLOG-NEXT:    br i1 %cond, label %latchExit.unr-lcssa.loopexit, label %for.exiting_block.7
 ; PROLOG:       for.exiting_block.7:
 ; PROLOG-NEXT:    %cmp.7 = icmp eq i64 %n, 42
@@ -1585,7 +1521,7 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.7 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.6
 ; PROLOG-NEXT:    %11 = load i32, ptr %arrayidx.7, align 4
 ; PROLOG-NEXT:    %add.7 = add nsw i32 %11, %add.6
-; PROLOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv.next.6, 1
+; PROLOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv, 8
 ; PROLOG-NEXT:    %exitcond.7 = icmp eq i64 %indvars.iv.next.7, %n
 ; PROLOG-NEXT:    br i1 %exitcond.7, label %latchExit.unr-lcssa.loopexit, label %header
 ; PROLOG:       latchExit.unr-lcssa.loopexit:
@@ -1652,7 +1588,7 @@ define i32 @hdr_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-BLOCK-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; PROLOG-BLOCK-NEXT:    %5 = load i32, ptr %arrayidx.1, align 4
 ; PROLOG-BLOCK-NEXT:    %add.1 = add nsw i32 %5, %add
-; PROLOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
+; PROLOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
 ; PROLOG-BLOCK-NEXT:    %exitcond.1 = icmp eq i64 %indvars.iv.next.1, %n
 ; PROLOG-BLOCK-NEXT:    br i1 %exitcond.1, label %latchExit.unr-lcssa.loopexit, label %header, !llvm.loop !4
 ; PROLOG-BLOCK:       latchExit.unr-lcssa.loopexit:
@@ -1725,7 +1661,6 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %3 = load i32, ptr %arrayidx, align 4
 ; EPILOG-NEXT:    %add = add nsw i32 %3, %sum.02
 ; EPILOG-NEXT:    %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.1
 ; EPILOG:       for.exiting_block.1:
 ; EPILOG-NEXT:    %cmp.1 = icmp eq i64 %n, 42
@@ -1734,8 +1669,7 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; EPILOG-NEXT:    %4 = load i32, ptr %arrayidx.1, align 4
 ; EPILOG-NEXT:    %add.1 = add nsw i32 %4, %add
-; EPILOG-NEXT:    %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.next, 1
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
+; EPILOG-NEXT:    %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.2
 ; EPILOG:       for.exiting_block.2:
 ; EPILOG-NEXT:    %cmp.2 = icmp eq i64 %n, 42
@@ -1744,8 +1678,7 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.1
 ; EPILOG-NEXT:    %5 = load i32, ptr %arrayidx.2, align 4
 ; EPILOG-NEXT:    %add.2 = add nsw i32 %5, %add.1
-; EPILOG-NEXT:    %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.next.1, 1
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
+; EPILOG-NEXT:    %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.3
 ; EPILOG:       for.exiting_block.3:
 ; EPILOG-NEXT:    %cmp.3 = icmp eq i64 %n, 42
@@ -1754,8 +1687,7 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.3 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.2
 ; EPILOG-NEXT:    %6 = load i32, ptr %arrayidx.3, align 4
 ; EPILOG-NEXT:    %add.3 = add nsw i32 %6, %add.2
-; EPILOG-NEXT:    %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.next.2, 1
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
+; EPILOG-NEXT:    %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.4
 ; EPILOG:       for.exiting_block.4:
 ; EPILOG-NEXT:    %cmp.4 = icmp eq i64 %n, 42
@@ -1764,8 +1696,7 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.4 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.3
 ; EPILOG-NEXT:    %7 = load i32, ptr %arrayidx.4, align 4
 ; EPILOG-NEXT:    %add.4 = add nsw i32 %7, %add.3
-; EPILOG-NEXT:    %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv.next.3, 1
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
+; EPILOG-NEXT:    %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.5
 ; EPILOG:       for.exiting_block.5:
 ; EPILOG-NEXT:    %cmp.5 = icmp eq i64 %n, 42
@@ -1774,8 +1705,7 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.5 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.4
 ; EPILOG-NEXT:    %8 = load i32, ptr %arrayidx.5, align 4
 ; EPILOG-NEXT:    %add.5 = add nsw i32 %8, %add.4
-; EPILOG-NEXT:    %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv.next.4, 1
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
+; EPILOG-NEXT:    %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv, 6
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.6
 ; EPILOG:       for.exiting_block.6:
 ; EPILOG-NEXT:    %cmp.6 = icmp eq i64 %n, 42
@@ -1784,8 +1714,7 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.6 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.5
 ; EPILOG-NEXT:    %9 = load i32, ptr %arrayidx.6, align 4
 ; EPILOG-NEXT:    %add.6 = add nsw i32 %9, %add.5
-; EPILOG-NEXT:    %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv.next.5, 1
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
+; EPILOG-NEXT:    %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv, 7
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.7
 ; EPILOG:       for.exiting_block.7:
 ; EPILOG-NEXT:    %cmp.7 = icmp eq i64 %n, 42
@@ -1794,8 +1723,8 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.7 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.6
 ; EPILOG-NEXT:    %10 = load i32, ptr %arrayidx.7, align 4
 ; EPILOG-NEXT:    %add.7 = add nsw i32 %10, %add.6
-; EPILOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv.next.6, 1
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv, 8
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %latchExit.unr-lcssa.loopexit, label %header
 ; EPILOG:       latchExit.unr-lcssa.loopexit:
@@ -1870,7 +1799,6 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-BLOCK-NEXT:    %3 = load i32, ptr %arrayidx, align 4
 ; EPILOG-BLOCK-NEXT:    %add = add nsw i32 %3, %sum.02
 ; EPILOG-BLOCK-NEXT:    %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.1
 ; EPILOG-BLOCK:       for.exiting_block.1:
 ; EPILOG-BLOCK-NEXT:    %cmp.1 = icmp eq i64 %n, 42
@@ -1879,8 +1807,8 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-BLOCK-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; EPILOG-BLOCK-NEXT:    %4 = load i32, ptr %arrayidx.1, align 4
 ; EPILOG-BLOCK-NEXT:    %add.1 = add nsw i32 %4, %add
-; EPILOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %latchExit.unr-lcssa.loopexit, label %header, !llvm.loop !5
 ; EPILOG-BLOCK:       latchExit.unr-lcssa.loopexit:
@@ -1979,7 +1907,7 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; PROLOG-NEXT:    %5 = load i32, ptr %arrayidx.1, align 4
 ; PROLOG-NEXT:    %add.1 = add nsw i32 %5, %add
-; PROLOG-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
+; PROLOG-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.2
 ; PROLOG:       for.exiting_block.2:
 ; PROLOG-NEXT:    %cmp.2 = icmp eq i64 %n, 42
@@ -1988,7 +1916,7 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.1
 ; PROLOG-NEXT:    %6 = load i32, ptr %arrayidx.2, align 4
 ; PROLOG-NEXT:    %add.2 = add nsw i32 %6, %add.1
-; PROLOG-NEXT:    %indvars.iv.next.2 = add i64 %indvars.iv.next.1, 1
+; PROLOG-NEXT:    %indvars.iv.next.2 = add i64 %indvars.iv, 3
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.3
 ; PROLOG:       for.exiting_block.3:
 ; PROLOG-NEXT:    %cmp.3 = icmp eq i64 %n, 42
@@ -1997,7 +1925,7 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.3 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.2
 ; PROLOG-NEXT:    %7 = load i32, ptr %arrayidx.3, align 4
 ; PROLOG-NEXT:    %add.3 = add nsw i32 %7, %add.2
-; PROLOG-NEXT:    %indvars.iv.next.3 = add i64 %indvars.iv.next.2, 1
+; PROLOG-NEXT:    %indvars.iv.next.3 = add i64 %indvars.iv, 4
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.4
 ; PROLOG:       for.exiting_block.4:
 ; PROLOG-NEXT:    %cmp.4 = icmp eq i64 %n, 42
@@ -2006,7 +1934,7 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.4 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.3
 ; PROLOG-NEXT:    %8 = load i32, ptr %arrayidx.4, align 4
 ; PROLOG-NEXT:    %add.4 = add nsw i32 %8, %add.3
-; PROLOG-NEXT:    %indvars.iv.next.4 = add i64 %indvars.iv.next.3, 1
+; PROLOG-NEXT:    %indvars.iv.next.4 = add i64 %indvars.iv, 5
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.5
 ; PROLOG:       for.exiting_block.5:
 ; PROLOG-NEXT:    %cmp.5 = icmp eq i64 %n, 42
@@ -2015,7 +1943,7 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.5 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.4
 ; PROLOG-NEXT:    %9 = load i32, ptr %arrayidx.5, align 4
 ; PROLOG-NEXT:    %add.5 = add nsw i32 %9, %add.4
-; PROLOG-NEXT:    %indvars.iv.next.5 = add i64 %indvars.iv.next.4, 1
+; PROLOG-NEXT:    %indvars.iv.next.5 = add i64 %indvars.iv, 6
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.6
 ; PROLOG:       for.exiting_block.6:
 ; PROLOG-NEXT:    %cmp.6 = icmp eq i64 %n, 42
@@ -2024,7 +1952,7 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.6 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.5
 ; PROLOG-NEXT:    %10 = load i32, ptr %arrayidx.6, align 4
 ; PROLOG-NEXT:    %add.6 = add nsw i32 %10, %add.5
-; PROLOG-NEXT:    %indvars.iv.next.6 = add i64 %indvars.iv.next.5, 1
+; PROLOG-NEXT:    %indvars.iv.next.6 = add i64 %indvars.iv, 7
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.7
 ; PROLOG:       for.exiting_block.7:
 ; PROLOG-NEXT:    %cmp.7 = icmp eq i64 %n, 42
@@ -2033,7 +1961,7 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.7 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.6
 ; PROLOG-NEXT:    %11 = load i32, ptr %arrayidx.7, align 4
 ; PROLOG-NEXT:    %add.7 = add nsw i32 %11, %add.6
-; PROLOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv.next.6, 1
+; PROLOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv, 8
 ; PROLOG-NEXT:    %exitcond.7 = icmp eq i64 %indvars.iv.next.7, %n
 ; PROLOG-NEXT:    br i1 %exitcond.7, label %latchExit.unr-lcssa.loopexit, label %header
 ; PROLOG:       latchExit.unr-lcssa.loopexit:
@@ -2100,7 +2028,7 @@ define i32 @otherblock_latch_same_exit(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-BLOCK-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; PROLOG-BLOCK-NEXT:    %5 = load i32, ptr %arrayidx.1, align 4
 ; PROLOG-BLOCK-NEXT:    %add.1 = add nsw i32 %5, %add
-; PROLOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
+; PROLOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
 ; PROLOG-BLOCK-NEXT:    %exitcond.1 = icmp eq i64 %indvars.iv.next.1, %n
 ; PROLOG-BLOCK-NEXT:    br i1 %exitcond.1, label %latchExit.unr-lcssa.loopexit, label %header, !llvm.loop !5
 ; PROLOG-BLOCK:       latchExit.unr-lcssa.loopexit:
@@ -2174,7 +2102,6 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %3 = load i32, ptr %arrayidx, align 4
 ; EPILOG-NEXT:    %add = add nsw i32 %3, %sum.02
 ; EPILOG-NEXT:    %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.1
 ; EPILOG:       for.exiting_block.1:
 ; EPILOG-NEXT:    %cmp.1 = icmp eq i64 %n, 42
@@ -2183,8 +2110,7 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; EPILOG-NEXT:    %4 = load i32, ptr %arrayidx.1, align 4
 ; EPILOG-NEXT:    %add.1 = add nsw i32 %4, %add
-; EPILOG-NEXT:    %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.next, 1
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
+; EPILOG-NEXT:    %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.2
 ; EPILOG:       for.exiting_block.2:
 ; EPILOG-NEXT:    %cmp.2 = icmp eq i64 %n, 42
@@ -2193,8 +2119,7 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.1
 ; EPILOG-NEXT:    %5 = load i32, ptr %arrayidx.2, align 4
 ; EPILOG-NEXT:    %add.2 = add nsw i32 %5, %add.1
-; EPILOG-NEXT:    %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.next.1, 1
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
+; EPILOG-NEXT:    %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.3
 ; EPILOG:       for.exiting_block.3:
 ; EPILOG-NEXT:    %cmp.3 = icmp eq i64 %n, 42
@@ -2203,8 +2128,7 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.3 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.2
 ; EPILOG-NEXT:    %6 = load i32, ptr %arrayidx.3, align 4
 ; EPILOG-NEXT:    %add.3 = add nsw i32 %6, %add.2
-; EPILOG-NEXT:    %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.next.2, 1
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
+; EPILOG-NEXT:    %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.4
 ; EPILOG:       for.exiting_block.4:
 ; EPILOG-NEXT:    %cmp.4 = icmp eq i64 %n, 42
@@ -2213,8 +2137,7 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.4 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.3
 ; EPILOG-NEXT:    %7 = load i32, ptr %arrayidx.4, align 4
 ; EPILOG-NEXT:    %add.4 = add nsw i32 %7, %add.3
-; EPILOG-NEXT:    %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv.next.3, 1
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
+; EPILOG-NEXT:    %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.5
 ; EPILOG:       for.exiting_block.5:
 ; EPILOG-NEXT:    %cmp.5 = icmp eq i64 %n, 42
@@ -2223,8 +2146,7 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.5 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.4
 ; EPILOG-NEXT:    %8 = load i32, ptr %arrayidx.5, align 4
 ; EPILOG-NEXT:    %add.5 = add nsw i32 %8, %add.4
-; EPILOG-NEXT:    %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv.next.4, 1
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
+; EPILOG-NEXT:    %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv, 6
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.6
 ; EPILOG:       for.exiting_block.6:
 ; EPILOG-NEXT:    %cmp.6 = icmp eq i64 %n, 42
@@ -2233,8 +2155,7 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.6 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.5
 ; EPILOG-NEXT:    %9 = load i32, ptr %arrayidx.6, align 4
 ; EPILOG-NEXT:    %add.6 = add nsw i32 %9, %add.5
-; EPILOG-NEXT:    %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv.next.5, 1
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
+; EPILOG-NEXT:    %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv, 7
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.7
 ; EPILOG:       for.exiting_block.7:
 ; EPILOG-NEXT:    %cmp.7 = icmp eq i64 %n, 42
@@ -2243,8 +2164,8 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %arrayidx.7 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.6
 ; EPILOG-NEXT:    %10 = load i32, ptr %arrayidx.7, align 4
 ; EPILOG-NEXT:    %add.7 = add nsw i32 %10, %add.6
-; EPILOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv.next.6, 1
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv, 8
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %latchExit.unr-lcssa.loopexit, label %header
 ; EPILOG:       latchExit.unr-lcssa.loopexit:
@@ -2319,7 +2240,6 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-BLOCK-NEXT:    %3 = load i32, ptr %arrayidx, align 4
 ; EPILOG-BLOCK-NEXT:    %add = add nsw i32 %3, %sum.02
 ; EPILOG-BLOCK-NEXT:    %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.1
 ; EPILOG-BLOCK:       for.exiting_block.1:
 ; EPILOG-BLOCK-NEXT:    %cmp.1 = icmp eq i64 %n, 42
@@ -2328,8 +2248,8 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-BLOCK-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; EPILOG-BLOCK-NEXT:    %4 = load i32, ptr %arrayidx.1, align 4
 ; EPILOG-BLOCK-NEXT:    %add.1 = add nsw i32 %4, %add
-; EPILOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %latchExit.unr-lcssa.loopexit, label %header, !llvm.loop !6
 ; EPILOG-BLOCK:       latchExit.unr-lcssa.loopexit:
@@ -2428,7 +2348,7 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; PROLOG-NEXT:    %5 = load i32, ptr %arrayidx.1, align 4
 ; PROLOG-NEXT:    %add.1 = add nsw i32 %5, %add
-; PROLOG-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
+; PROLOG-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.2
 ; PROLOG:       for.exiting_block.2:
 ; PROLOG-NEXT:    %cmp.2 = icmp eq i64 %n, 42
@@ -2437,7 +2357,7 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.1
 ; PROLOG-NEXT:    %6 = load i32, ptr %arrayidx.2, align 4
 ; PROLOG-NEXT:    %add.2 = add nsw i32 %6, %add.1
-; PROLOG-NEXT:    %indvars.iv.next.2 = add i64 %indvars.iv.next.1, 1
+; PROLOG-NEXT:    %indvars.iv.next.2 = add i64 %indvars.iv, 3
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.3
 ; PROLOG:       for.exiting_block.3:
 ; PROLOG-NEXT:    %cmp.3 = icmp eq i64 %n, 42
@@ -2446,7 +2366,7 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.3 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.2
 ; PROLOG-NEXT:    %7 = load i32, ptr %arrayidx.3, align 4
 ; PROLOG-NEXT:    %add.3 = add nsw i32 %7, %add.2
-; PROLOG-NEXT:    %indvars.iv.next.3 = add i64 %indvars.iv.next.2, 1
+; PROLOG-NEXT:    %indvars.iv.next.3 = add i64 %indvars.iv, 4
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.4
 ; PROLOG:       for.exiting_block.4:
 ; PROLOG-NEXT:    %cmp.4 = icmp eq i64 %n, 42
@@ -2455,7 +2375,7 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.4 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.3
 ; PROLOG-NEXT:    %8 = load i32, ptr %arrayidx.4, align 4
 ; PROLOG-NEXT:    %add.4 = add nsw i32 %8, %add.3
-; PROLOG-NEXT:    %indvars.iv.next.4 = add i64 %indvars.iv.next.3, 1
+; PROLOG-NEXT:    %indvars.iv.next.4 = add i64 %indvars.iv, 5
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.5
 ; PROLOG:       for.exiting_block.5:
 ; PROLOG-NEXT:    %cmp.5 = icmp eq i64 %n, 42
@@ -2464,7 +2384,7 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.5 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.4
 ; PROLOG-NEXT:    %9 = load i32, ptr %arrayidx.5, align 4
 ; PROLOG-NEXT:    %add.5 = add nsw i32 %9, %add.4
-; PROLOG-NEXT:    %indvars.iv.next.5 = add i64 %indvars.iv.next.4, 1
+; PROLOG-NEXT:    %indvars.iv.next.5 = add i64 %indvars.iv, 6
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.6
 ; PROLOG:       for.exiting_block.6:
 ; PROLOG-NEXT:    %cmp.6 = icmp eq i64 %n, 42
@@ -2473,7 +2393,7 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.6 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.5
 ; PROLOG-NEXT:    %10 = load i32, ptr %arrayidx.6, align 4
 ; PROLOG-NEXT:    %add.6 = add nsw i32 %10, %add.5
-; PROLOG-NEXT:    %indvars.iv.next.6 = add i64 %indvars.iv.next.5, 1
+; PROLOG-NEXT:    %indvars.iv.next.6 = add i64 %indvars.iv, 7
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.7
 ; PROLOG:       for.exiting_block.7:
 ; PROLOG-NEXT:    %cmp.7 = icmp eq i64 %n, 42
@@ -2482,7 +2402,7 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %arrayidx.7 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.6
 ; PROLOG-NEXT:    %11 = load i32, ptr %arrayidx.7, align 4
 ; PROLOG-NEXT:    %add.7 = add nsw i32 %11, %add.6
-; PROLOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv.next.6, 1
+; PROLOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv, 8
 ; PROLOG-NEXT:    %exitcond.7 = icmp eq i64 %indvars.iv.next.7, %n
 ; PROLOG-NEXT:    br i1 %exitcond.7, label %latchExit.unr-lcssa.loopexit, label %header
 ; PROLOG:       latchExit.unr-lcssa.loopexit:
@@ -2549,7 +2469,7 @@ define i32 @otherblock_latch_same_exit2(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-BLOCK-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; PROLOG-BLOCK-NEXT:    %5 = load i32, ptr %arrayidx.1, align 4
 ; PROLOG-BLOCK-NEXT:    %add.1 = add nsw i32 %5, %add
-; PROLOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
+; PROLOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
 ; PROLOG-BLOCK-NEXT:    %exitcond.1 = icmp eq i64 %indvars.iv.next.1, %n
 ; PROLOG-BLOCK-NEXT:    br i1 %exitcond.1, label %latchExit.unr-lcssa.loopexit, label %header, !llvm.loop !6
 ; PROLOG-BLOCK:       latchExit.unr-lcssa.loopexit:
@@ -2624,7 +2544,6 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    br i1 %cmp, label %latchExit.epilog-lcssa.loopexit, label %latch
 ; EPILOG:       latch:
 ; EPILOG-NEXT:    %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.1
 ; EPILOG:       for.exiting_block.1:
 ; EPILOG-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
@@ -2633,8 +2552,7 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %cmp.1 = icmp eq i64 %n, 42
 ; EPILOG-NEXT:    br i1 %cmp.1, label %latchExit.epilog-lcssa.loopexit, label %latch.1
 ; EPILOG:       latch.1:
-; EPILOG-NEXT:    %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.next, 1
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
+; EPILOG-NEXT:    %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.2
 ; EPILOG:       for.exiting_block.2:
 ; EPILOG-NEXT:    %arrayidx.2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.1
@@ -2643,8 +2561,7 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %cmp.2 = icmp eq i64 %n, 42
 ; EPILOG-NEXT:    br i1 %cmp.2, label %latchExit.epilog-lcssa.loopexit, label %latch.2
 ; EPILOG:       latch.2:
-; EPILOG-NEXT:    %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.next.1, 1
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
+; EPILOG-NEXT:    %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.3
 ; EPILOG:       for.exiting_block.3:
 ; EPILOG-NEXT:    %arrayidx.3 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.2
@@ -2653,8 +2570,7 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %cmp.3 = icmp eq i64 %n, 42
 ; EPILOG-NEXT:    br i1 %cmp.3, label %latchExit.epilog-lcssa.loopexit, label %latch.3
 ; EPILOG:       latch.3:
-; EPILOG-NEXT:    %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.next.2, 1
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
+; EPILOG-NEXT:    %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.4
 ; EPILOG:       for.exiting_block.4:
 ; EPILOG-NEXT:    %arrayidx.4 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.3
@@ -2663,8 +2579,7 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %cmp.4 = icmp eq i64 %n, 42
 ; EPILOG-NEXT:    br i1 %cmp.4, label %latchExit.epilog-lcssa.loopexit, label %latch.4
 ; EPILOG:       latch.4:
-; EPILOG-NEXT:    %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv.next.3, 1
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
+; EPILOG-NEXT:    %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.5
 ; EPILOG:       for.exiting_block.5:
 ; EPILOG-NEXT:    %arrayidx.5 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.4
@@ -2673,8 +2588,7 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %cmp.5 = icmp eq i64 %n, 42
 ; EPILOG-NEXT:    br i1 %cmp.5, label %latchExit.epilog-lcssa.loopexit, label %latch.5
 ; EPILOG:       latch.5:
-; EPILOG-NEXT:    %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv.next.4, 1
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
+; EPILOG-NEXT:    %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv, 6
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.6
 ; EPILOG:       for.exiting_block.6:
 ; EPILOG-NEXT:    %arrayidx.6 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.5
@@ -2683,8 +2597,7 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %cmp.6 = icmp eq i64 %n, 42
 ; EPILOG-NEXT:    br i1 %cmp.6, label %latchExit.epilog-lcssa.loopexit, label %latch.6
 ; EPILOG:       latch.6:
-; EPILOG-NEXT:    %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv.next.5, 1
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
+; EPILOG-NEXT:    %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv, 7
 ; EPILOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.7
 ; EPILOG:       for.exiting_block.7:
 ; EPILOG-NEXT:    %arrayidx.7 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.6
@@ -2693,8 +2606,8 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-NEXT:    %cmp.7 = icmp eq i64 %n, 42
 ; EPILOG-NEXT:    br i1 %cmp.7, label %latchExit.epilog-lcssa.loopexit, label %latch.7
 ; EPILOG:       latch.7:
-; EPILOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv.next.6, 1
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv, 8
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %latchExit.unr-lcssa.loopexit, label %header
 ; EPILOG:       latchExit.unr-lcssa.loopexit:
@@ -2769,7 +2682,6 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-BLOCK-NEXT:    br i1 %cmp, label %latchExit.epilog-lcssa.loopexit, label %latch
 ; EPILOG-BLOCK:       latch:
 ; EPILOG-BLOCK-NEXT:    %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.1
 ; EPILOG-BLOCK:       for.exiting_block.1:
 ; EPILOG-BLOCK-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
@@ -2778,8 +2690,8 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; EPILOG-BLOCK-NEXT:    %cmp.1 = icmp eq i64 %n, 42
 ; EPILOG-BLOCK-NEXT:    br i1 %cmp.1, label %latchExit.epilog-lcssa.loopexit, label %latch.1
 ; EPILOG-BLOCK:       latch.1:
-; EPILOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %latchExit.unr-lcssa.loopexit, label %header, !llvm.loop !7
 ; EPILOG-BLOCK:       latchExit.unr-lcssa.loopexit:
@@ -2878,7 +2790,7 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %cmp.1 = icmp eq i64 %n, 42
 ; PROLOG-NEXT:    br i1 %cmp.1, label %latchExit.unr-lcssa.loopexit, label %latch.1
 ; PROLOG:       latch.1:
-; PROLOG-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
+; PROLOG-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.2
 ; PROLOG:       for.exiting_block.2:
 ; PROLOG-NEXT:    %arrayidx.2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.1
@@ -2887,7 +2799,7 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %cmp.2 = icmp eq i64 %n, 42
 ; PROLOG-NEXT:    br i1 %cmp.2, label %latchExit.unr-lcssa.loopexit, label %latch.2
 ; PROLOG:       latch.2:
-; PROLOG-NEXT:    %indvars.iv.next.2 = add i64 %indvars.iv.next.1, 1
+; PROLOG-NEXT:    %indvars.iv.next.2 = add i64 %indvars.iv, 3
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.3
 ; PROLOG:       for.exiting_block.3:
 ; PROLOG-NEXT:    %arrayidx.3 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.2
@@ -2896,7 +2808,7 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %cmp.3 = icmp eq i64 %n, 42
 ; PROLOG-NEXT:    br i1 %cmp.3, label %latchExit.unr-lcssa.loopexit, label %latch.3
 ; PROLOG:       latch.3:
-; PROLOG-NEXT:    %indvars.iv.next.3 = add i64 %indvars.iv.next.2, 1
+; PROLOG-NEXT:    %indvars.iv.next.3 = add i64 %indvars.iv, 4
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.4
 ; PROLOG:       for.exiting_block.4:
 ; PROLOG-NEXT:    %arrayidx.4 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.3
@@ -2905,7 +2817,7 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %cmp.4 = icmp eq i64 %n, 42
 ; PROLOG-NEXT:    br i1 %cmp.4, label %latchExit.unr-lcssa.loopexit, label %latch.4
 ; PROLOG:       latch.4:
-; PROLOG-NEXT:    %indvars.iv.next.4 = add i64 %indvars.iv.next.3, 1
+; PROLOG-NEXT:    %indvars.iv.next.4 = add i64 %indvars.iv, 5
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.5
 ; PROLOG:       for.exiting_block.5:
 ; PROLOG-NEXT:    %arrayidx.5 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.4
@@ -2914,7 +2826,7 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %cmp.5 = icmp eq i64 %n, 42
 ; PROLOG-NEXT:    br i1 %cmp.5, label %latchExit.unr-lcssa.loopexit, label %latch.5
 ; PROLOG:       latch.5:
-; PROLOG-NEXT:    %indvars.iv.next.5 = add i64 %indvars.iv.next.4, 1
+; PROLOG-NEXT:    %indvars.iv.next.5 = add i64 %indvars.iv, 6
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.6
 ; PROLOG:       for.exiting_block.6:
 ; PROLOG-NEXT:    %arrayidx.6 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.5
@@ -2923,7 +2835,7 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %cmp.6 = icmp eq i64 %n, 42
 ; PROLOG-NEXT:    br i1 %cmp.6, label %latchExit.unr-lcssa.loopexit, label %latch.6
 ; PROLOG:       latch.6:
-; PROLOG-NEXT:    %indvars.iv.next.6 = add i64 %indvars.iv.next.5, 1
+; PROLOG-NEXT:    %indvars.iv.next.6 = add i64 %indvars.iv, 7
 ; PROLOG-NEXT:    br i1 %cond, label %for.exit2.loopexit, label %for.exiting_block.7
 ; PROLOG:       for.exiting_block.7:
 ; PROLOG-NEXT:    %arrayidx.7 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.6
@@ -2932,7 +2844,7 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-NEXT:    %cmp.7 = icmp eq i64 %n, 42
 ; PROLOG-NEXT:    br i1 %cmp.7, label %latchExit.unr-lcssa.loopexit, label %latch.7
 ; PROLOG:       latch.7:
-; PROLOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv.next.6, 1
+; PROLOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv, 8
 ; PROLOG-NEXT:    %exitcond.7 = icmp eq i64 %indvars.iv.next.7, %n
 ; PROLOG-NEXT:    br i1 %exitcond.7, label %latchExit.unr-lcssa.loopexit, label %header
 ; PROLOG:       latchExit.unr-lcssa.loopexit:
@@ -2999,7 +2911,7 @@ define i32 @otherblock_latch_same_exit3(ptr nocapture %a, i64 %n, i1 %cond) {
 ; PROLOG-BLOCK-NEXT:    %cmp.1 = icmp eq i64 %n, 42
 ; PROLOG-BLOCK-NEXT:    br i1 %cmp.1, label %latchExit.unr-lcssa.loopexit, label %latch.1
 ; PROLOG-BLOCK:       latch.1:
-; PROLOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
+; PROLOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
 ; PROLOG-BLOCK-NEXT:    %exitcond.1 = icmp eq i64 %indvars.iv.next.1, %n
 ; PROLOG-BLOCK-NEXT:    br i1 %exitcond.1, label %latchExit.unr-lcssa.loopexit, label %header, !llvm.loop !7
 ; PROLOG-BLOCK:       latchExit.unr-lcssa.loopexit:
@@ -3112,42 +3024,35 @@ define void @unique_exit(i32 %N, i32 %M) {
 ; EPILOG-NEXT:    %cmp1 = icmp ult i32 %inc, %N
 ; EPILOG-NEXT:    br i1 %cmp1, label %latch, label %latchExit.epilog-lcssa.loopexit
 ; EPILOG:       latch:
-; EPILOG-NEXT:    %niter.next = add nuw nsw i32 %niter, 1
-; EPILOG-NEXT:    %inc.1 = add nuw nsw i32 %inc, 1
+; EPILOG-NEXT:    %inc.1 = add nuw nsw i32 %i4, 2
 ; EPILOG-NEXT:    %cmp1.1 = icmp ult i32 %inc.1, %N
 ; EPILOG-NEXT:    br i1 %cmp1.1, label %latch.1, label %latchExit.epilog-lcssa.loopexit
 ; EPILOG:       latch.1:
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i32 %niter.next, 1
-; EPILOG-NEXT:    %inc.2 = add nuw nsw i32 %inc.1, 1
+; EPILOG-NEXT:    %inc.2 = add nuw nsw i32 %i4, 3
 ; EPILOG-NEXT:    %cmp1.2 = icmp ult i32 %inc.2, %N
 ; EPILOG-NEXT:    br i1 %cmp1.2, label %latch.2, label %latchExit.epilog-lcssa.loopexit
 ; EPILOG:       latch.2:
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i32 %niter.next.1, 1
-; EPILOG-NEXT:    %inc.3 = add nuw nsw i32 %inc.2, 1
+; EPILOG-NEXT:    %inc.3 = add nuw nsw i32 %i4, 4
 ; EPILOG-NEXT:    %cmp1.3 = icmp ult i32 %inc.3, %N
 ; EPILOG-NEXT:    br i1 %cmp1.3, label %latch.3, label %latchExit.epilog-lcssa.loopexit
 ; EPILOG:       latch.3:
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i32 %niter.next.2, 1
-; EPILOG-NEXT:    %inc.4 = add nuw nsw i32 %inc.3, 1
+; EPILOG-NEXT:    %inc.4 = add nuw nsw i32 %i4, 5
 ; EPILOG-NEXT:    %cmp1.4 = icmp ult i32 %inc.4, %N
 ; EPILOG-NEXT:    br i1 %cmp1.4, label %latch.4, label %latchExit.epilog-lcssa.loopexit
 ; EPILOG:       latch.4:
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i32 %niter.next.3, 1
-; EPILOG-NEXT:    %inc.5 = add nuw nsw i32 %inc.4, 1
+; EPILOG-NEXT:    %inc.5 = add nuw nsw i32 %i4, 6
 ; EPILOG-NEXT:    %cmp1.5 = icmp ult i32 %inc.5, %N
 ; EPILOG-NEXT:    br i1 %cmp1.5, label %latch.5, label %latchExit.epilog-lcssa.loopexit
 ; EPILOG:       latch.5:
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i32 %niter.next.4, 1
-; EPILOG-NEXT:    %inc.6 = add nuw nsw i32 %inc.5, 1
+; EPILOG-NEXT:    %inc.6 = add nuw nsw i32 %i4, 7
 ; EPILOG-NEXT:    %cmp1.6 = icmp ult i32 %inc.6, %N
 ; EPILOG-NEXT:    br i1 %cmp1.6, label %latch.6, label %latchExit.epilog-lcssa.loopexit
 ; EPILOG:       latch.6:
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i32 %niter.next.5, 1
-; EPILOG-NEXT:    %inc.7 = add nuw i32 %inc.6, 1
+; EPILOG-NEXT:    %inc.7 = add nuw i32 %i4, 8
 ; EPILOG-NEXT:    %cmp1.7 = icmp ult i32 %inc.7, %N
 ; EPILOG-NEXT:    br i1 %cmp1.7, label %latch.7, label %latchExit.epilog-lcssa.loopexit
 ; EPILOG:       latch.7:
-; EPILOG-NEXT:    %niter.next.7 = add nuw i32 %niter.next.6, 1
+; EPILOG-NEXT:    %niter.next.7 = add nuw i32 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp ne i32 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %header, label %latchExit.unr-lcssa.loopexit
 ; EPILOG:       latchExit.unr-lcssa.loopexit:
@@ -3204,12 +3109,11 @@ define void @unique_exit(i32 %N, i32 %M) {
 ; EPILOG-BLOCK-NEXT:    %cmp1 = icmp ult i32 %inc, %N
 ; EPILOG-BLOCK-NEXT:    br i1 %cmp1, label %latch, label %latchExit.epilog-lcssa.loopexit
 ; EPILOG-BLOCK:       latch:
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i32 %niter, 1
-; EPILOG-BLOCK-NEXT:    %inc.1 = add nuw i32 %inc, 1
+; EPILOG-BLOCK-NEXT:    %inc.1 = add nuw i32 %i4, 2
 ; EPILOG-BLOCK-NEXT:    %cmp1.1 = icmp ult i32 %inc.1, %N
 ; EPILOG-BLOCK-NEXT:    br i1 %cmp1.1, label %latch.1, label %latchExit.epilog-lcssa.loopexit
 ; EPILOG-BLOCK:       latch.1:
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add nuw i32 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add nuw i32 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp ne i32 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %header, label %latchExit.unr-lcssa.loopexit, !llvm.loop !8
 ; EPILOG-BLOCK:       latchExit.unr-lcssa.loopexit:
@@ -3278,31 +3182,31 @@ define void @unique_exit(i32 %N, i32 %M) {
 ; PROLOG-NEXT:    %cmp1 = icmp ult i32 %inc, %N
 ; PROLOG-NEXT:    br i1 %cmp1, label %latch, label %latchExit.unr-lcssa.loopexit
 ; PROLOG:       latch:
-; PROLOG-NEXT:    %inc.1 = add nuw i32 %inc, 1
+; PROLOG-NEXT:    %inc.1 = add nuw i32 %i4, 2
 ; PROLOG-NEXT:    %cmp1.1 = icmp ult i32 %inc.1, %N
 ; PROLOG-NEXT:    br i1 %cmp1.1, label %latch.1, label %latchExit.unr-lcssa.loopexit
 ; PROLOG:       latch.1:
-; PROLOG-NEXT:    %inc.2 = add nuw i32 %inc.1, 1
+; PROLOG-NEXT:    %inc.2 = add nuw i32 %i4, 3
 ; PROLOG-NEXT:    %cmp1.2 = icmp ult i32 %inc.2, %N
 ; PROLOG-NEXT:    br i1 %cmp1.2, label %latch.2, label %latchExit.unr-lcssa.loopexit
 ; PROLOG:       latch.2:
-; PROLOG-NEXT:    %inc.3 = add nuw i32 %inc.2, 1
+; PROLOG-NEXT:    %inc.3 = add nuw i32 %i4, 4
 ; PROLOG-NEXT:    %cmp1.3 = icmp ult i32 %inc.3, %N
 ; PROLOG-NEXT:    br i1 %cmp1.3, label %latch.3, label %latchExit.unr-lcssa.loopexit
 ; PROLOG:       latch.3:
-; PROLOG-NEXT:    %inc.4 = add nuw i32 %inc.3, 1
+; PROLOG-NEXT:    %inc.4 = add nuw i32 %i4, 5
 ; PROLOG-NEXT:    %cmp1.4 = icmp ult i32 %inc.4, %N
 ; PROLOG-NEXT:    br i1 %cmp1.4, label %latch.4, label %latchExit.unr-lcssa.loopexit
 ; PROLOG:       latch.4:
-; PROLOG-NEXT:    %inc.5 = add nuw i32 %inc.4, 1
+; PROLOG-NEXT:    %inc.5 = add nuw i32 %i4, 6
 ; PROLOG-NEXT:    %cmp1.5 = icmp ult i32 %inc.5, %N
 ; PROLOG-NEXT:    br i1 %cmp1.5, label %latch.5, label %latchExit.unr-lcssa.loopexit
 ; PROLOG:       latch.5:
-; PROLOG-NEXT:    %inc.6 = add nuw i32 %inc.5, 1
+; PROLOG-NEXT:    %inc.6 = add nuw i32 %i4, 7
 ; PROLOG-NEXT:    %cmp1.6 = icmp ult i32 %inc.6, %N
 ; PROLOG-NEXT:    br i1 %cmp1.6, label %latch.6, label %latchExit.unr-lcssa.loopexit
 ; PROLOG:       latch.6:
-; PROLOG-NEXT:    %inc.7 = add nuw i32 %inc.6, 1
+; PROLOG-NEXT:    %inc.7 = add nuw i32 %i4, 8
 ; PROLOG-NEXT:    %cmp1.7 = icmp ult i32 %inc.7, %N
 ; PROLOG-NEXT:    br i1 %cmp1.7, label %latch.7, label %latchExit.unr-lcssa.loopexit
 ; PROLOG:       latch.7:
@@ -3350,7 +3254,7 @@ define void @unique_exit(i32 %N, i32 %M) {
 ; PROLOG-BLOCK-NEXT:    %cmp1 = icmp ult i32 %inc, %N
 ; PROLOG-BLOCK-NEXT:    br i1 %cmp1, label %latch, label %latchExit.unr-lcssa.loopexit
 ; PROLOG-BLOCK:       latch:
-; PROLOG-BLOCK-NEXT:    %inc.1 = add nuw i32 %inc, 1
+; PROLOG-BLOCK-NEXT:    %inc.1 = add nuw i32 %i4, 2
 ; PROLOG-BLOCK-NEXT:    %cmp1.1 = icmp ult i32 %inc.1, %N
 ; PROLOG-BLOCK-NEXT:    br i1 %cmp1.1, label %latch.1, label %latchExit.unr-lcssa.loopexit
 ; PROLOG-BLOCK:       latch.1:
@@ -3414,7 +3318,6 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; EPILOG:       loop_latch:
 ; EPILOG-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
 ; EPILOG-NEXT:    %sum.next = add i64 %sum, %add
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.1, label %loop_exiting.1
 ; EPILOG:       loop_exiting.1:
 ; EPILOG-NEXT:    %ivy.1 = add i64 %iv_next, %add
@@ -3423,9 +3326,8 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; EPILOG-NEXT:    i64 42, label %exit1.loopexit
 ; EPILOG-NEXT:    ]
 ; EPILOG:       loop_latch.1:
-; EPILOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv_next, 1
+; EPILOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv, 2
 ; EPILOG-NEXT:    %sum.next.1 = add i64 %sum.next, %add
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.2, label %loop_exiting.2
 ; EPILOG:       loop_exiting.2:
 ; EPILOG-NEXT:    %ivy.2 = add i64 %iv_next.1, %add
@@ -3434,9 +3336,8 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; EPILOG-NEXT:    i64 42, label %exit1.loopexit
 ; EPILOG-NEXT:    ]
 ; EPILOG:       loop_latch.2:
-; EPILOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv_next.1, 1
+; EPILOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv, 3
 ; EPILOG-NEXT:    %sum.next.2 = add i64 %sum.next.1, %add
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.3, label %loop_exiting.3
 ; EPILOG:       loop_exiting.3:
 ; EPILOG-NEXT:    %ivy.3 = add i64 %iv_next.2, %add
@@ -3445,9 +3346,8 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; EPILOG-NEXT:    i64 42, label %exit1.loopexit
 ; EPILOG-NEXT:    ]
 ; EPILOG:       loop_latch.3:
-; EPILOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv_next.2, 1
+; EPILOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv, 4
 ; EPILOG-NEXT:    %sum.next.3 = add i64 %sum.next.2, %add
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.4, label %loop_exiting.4
 ; EPILOG:       loop_exiting.4:
 ; EPILOG-NEXT:    %ivy.4 = add i64 %iv_next.3, %add
@@ -3456,9 +3356,8 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; EPILOG-NEXT:    i64 42, label %exit1.loopexit
 ; EPILOG-NEXT:    ]
 ; EPILOG:       loop_latch.4:
-; EPILOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv_next.3, 1
+; EPILOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv, 5
 ; EPILOG-NEXT:    %sum.next.4 = add i64 %sum.next.3, %add
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.5, label %loop_exiting.5
 ; EPILOG:       loop_exiting.5:
 ; EPILOG-NEXT:    %ivy.5 = add i64 %iv_next.4, %add
@@ -3467,9 +3366,8 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; EPILOG-NEXT:    i64 42, label %exit1.loopexit
 ; EPILOG-NEXT:    ]
 ; EPILOG:       loop_latch.5:
-; EPILOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv_next.4, 1
+; EPILOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv, 6
 ; EPILOG-NEXT:    %sum.next.5 = add i64 %sum.next.4, %add
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.6, label %loop_exiting.6
 ; EPILOG:       loop_exiting.6:
 ; EPILOG-NEXT:    %ivy.6 = add i64 %iv_next.5, %add
@@ -3478,9 +3376,8 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; EPILOG-NEXT:    i64 42, label %exit1.loopexit
 ; EPILOG-NEXT:    ]
 ; EPILOG:       loop_latch.6:
-; EPILOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv_next.5, 1
+; EPILOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv, 7
 ; EPILOG-NEXT:    %sum.next.6 = add i64 %sum.next.5, %add
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.7, label %loop_exiting.7
 ; EPILOG:       loop_exiting.7:
 ; EPILOG-NEXT:    %ivy.7 = add i64 %iv_next.6, %add
@@ -3489,9 +3386,9 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; EPILOG-NEXT:    i64 42, label %exit1.loopexit
 ; EPILOG-NEXT:    ]
 ; EPILOG:       loop_latch.7:
-; EPILOG-NEXT:    %iv_next.7 = add nuw nsw i64 %iv_next.6, 1
+; EPILOG-NEXT:    %iv_next.7 = add nuw nsw i64 %iv, 8
 ; EPILOG-NEXT:    %sum.next.7 = add i64 %sum.next.6, %add
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp ne i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %loop_header, label %latchexit.unr-lcssa.loopexit
 ; EPILOG:       exit1.loopexit:
@@ -3565,7 +3462,6 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; EPILOG-BLOCK:       loop_latch:
 ; EPILOG-BLOCK-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
 ; EPILOG-BLOCK-NEXT:    %sum.next = add i64 %sum, %add
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    br i1 %cond, label %loop_latch.1, label %loop_exiting.1
 ; EPILOG-BLOCK:       loop_exiting.1:
 ; EPILOG-BLOCK-NEXT:    %ivy.1 = add i64 %iv_next, %add
@@ -3574,9 +3470,9 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; EPILOG-BLOCK-NEXT:    i64 42, label %exit1.loopexit
 ; EPILOG-BLOCK-NEXT:    ]
 ; EPILOG-BLOCK:       loop_latch.1:
-; EPILOG-BLOCK-NEXT:    %iv_next.1 = add nuw nsw i64 %iv_next, 1
+; EPILOG-BLOCK-NEXT:    %iv_next.1 = add nuw nsw i64 %iv, 2
 ; EPILOG-BLOCK-NEXT:    %sum.next.1 = add i64 %sum.next, %add
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp ne i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %loop_header, label %latchexit.unr-lcssa.loopexit, !llvm.loop !9
 ; EPILOG-BLOCK:       exit1.loopexit:
@@ -3674,7 +3570,7 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; PROLOG-NEXT:    i64 42, label %exit1.loopexit
 ; PROLOG-NEXT:    ]
 ; PROLOG:       loop_latch.1:
-; PROLOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv_next, 1
+; PROLOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv, 2
 ; PROLOG-NEXT:    %sum.next.1 = add i64 %sum.next, %add
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.2, label %loop_exiting.2
 ; PROLOG:       loop_exiting.2:
@@ -3684,7 +3580,7 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; PROLOG-NEXT:    i64 42, label %exit1.loopexit
 ; PROLOG-NEXT:    ]
 ; PROLOG:       loop_latch.2:
-; PROLOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv_next.1, 1
+; PROLOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv, 3
 ; PROLOG-NEXT:    %sum.next.2 = add i64 %sum.next.1, %add
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.3, label %loop_exiting.3
 ; PROLOG:       loop_exiting.3:
@@ -3694,7 +3590,7 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; PROLOG-NEXT:    i64 42, label %exit1.loopexit
 ; PROLOG-NEXT:    ]
 ; PROLOG:       loop_latch.3:
-; PROLOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv_next.2, 1
+; PROLOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv, 4
 ; PROLOG-NEXT:    %sum.next.3 = add i64 %sum.next.2, %add
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.4, label %loop_exiting.4
 ; PROLOG:       loop_exiting.4:
@@ -3704,7 +3600,7 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; PROLOG-NEXT:    i64 42, label %exit1.loopexit
 ; PROLOG-NEXT:    ]
 ; PROLOG:       loop_latch.4:
-; PROLOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv_next.3, 1
+; PROLOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv, 5
 ; PROLOG-NEXT:    %sum.next.4 = add i64 %sum.next.3, %add
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.5, label %loop_exiting.5
 ; PROLOG:       loop_exiting.5:
@@ -3714,7 +3610,7 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; PROLOG-NEXT:    i64 42, label %exit1.loopexit
 ; PROLOG-NEXT:    ]
 ; PROLOG:       loop_latch.5:
-; PROLOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv_next.4, 1
+; PROLOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv, 6
 ; PROLOG-NEXT:    %sum.next.5 = add i64 %sum.next.4, %add
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.6, label %loop_exiting.6
 ; PROLOG:       loop_exiting.6:
@@ -3724,7 +3620,7 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; PROLOG-NEXT:    i64 42, label %exit1.loopexit
 ; PROLOG-NEXT:    ]
 ; PROLOG:       loop_latch.6:
-; PROLOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv_next.5, 1
+; PROLOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv, 7
 ; PROLOG-NEXT:    %sum.next.6 = add i64 %sum.next.5, %add
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.7, label %loop_exiting.7
 ; PROLOG:       loop_exiting.7:
@@ -3734,7 +3630,7 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; PROLOG-NEXT:    i64 42, label %exit1.loopexit
 ; PROLOG-NEXT:    ]
 ; PROLOG:       loop_latch.7:
-; PROLOG-NEXT:    %iv_next.7 = add nuw nsw i64 %iv_next.6, 1
+; PROLOG-NEXT:    %iv_next.7 = add nuw nsw i64 %iv, 8
 ; PROLOG-NEXT:    %sum.next.7 = add i64 %sum.next.6, %add
 ; PROLOG-NEXT:    %cmp.7 = icmp ne i64 %iv_next.7, %trip
 ; PROLOG-NEXT:    br i1 %cmp.7, label %loop_header, label %latchexit.unr-lcssa
@@ -3801,7 +3697,7 @@ define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
 ; PROLOG-BLOCK-NEXT:    i64 42, label %exit1.loopexit
 ; PROLOG-BLOCK-NEXT:    ]
 ; PROLOG-BLOCK:       loop_latch.1:
-; PROLOG-BLOCK-NEXT:    %iv_next.1 = add nuw nsw i64 %iv_next, 1
+; PROLOG-BLOCK-NEXT:    %iv_next.1 = add nuw nsw i64 %iv, 2
 ; PROLOG-BLOCK-NEXT:    %sum.next.1 = add i64 %sum.next, %add
 ; PROLOG-BLOCK-NEXT:    %cmp.1 = icmp ne i64 %iv_next.1, %trip
 ; PROLOG-BLOCK-NEXT:    br i1 %cmp.1, label %loop_header, label %latchexit.unr-lcssa, !llvm.loop !9
@@ -3873,7 +3769,6 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; EPILOG-NEXT:    %load = load i32, ptr %arrayidx, align 4
 ; EPILOG-NEXT:    %add = add nsw i32 %load, %sum.02
 ; EPILOG-NEXT:    %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.1
 ; EPILOG:       for.exiting_block.1:
 ; EPILOG-NEXT:    %cmp.1 = icmp eq i64 %n, 42
@@ -3882,8 +3777,7 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; EPILOG-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; EPILOG-NEXT:    %load.1 = load i32, ptr %arrayidx.1, align 4
 ; EPILOG-NEXT:    %add.1 = add nsw i32 %load.1, %add
-; EPILOG-NEXT:    %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.next, 1
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
+; EPILOG-NEXT:    %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
 ; EPILOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.2
 ; EPILOG:       for.exiting_block.2:
 ; EPILOG-NEXT:    %cmp.2 = icmp eq i64 %n, 42
@@ -3892,8 +3786,7 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; EPILOG-NEXT:    %arrayidx.2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.1
 ; EPILOG-NEXT:    %load.2 = load i32, ptr %arrayidx.2, align 4
 ; EPILOG-NEXT:    %add.2 = add nsw i32 %load.2, %add.1
-; EPILOG-NEXT:    %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.next.1, 1
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
+; EPILOG-NEXT:    %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
 ; EPILOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.3
 ; EPILOG:       for.exiting_block.3:
 ; EPILOG-NEXT:    %cmp.3 = icmp eq i64 %n, 42
@@ -3902,8 +3795,7 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; EPILOG-NEXT:    %arrayidx.3 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.2
 ; EPILOG-NEXT:    %load.3 = load i32, ptr %arrayidx.3, align 4
 ; EPILOG-NEXT:    %add.3 = add nsw i32 %load.3, %add.2
-; EPILOG-NEXT:    %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.next.2, 1
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
+; EPILOG-NEXT:    %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
 ; EPILOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.4
 ; EPILOG:       for.exiting_block.4:
 ; EPILOG-NEXT:    %cmp.4 = icmp eq i64 %n, 42
@@ -3912,8 +3804,7 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; EPILOG-NEXT:    %arrayidx.4 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.3
 ; EPILOG-NEXT:    %load.4 = load i32, ptr %arrayidx.4, align 4
 ; EPILOG-NEXT:    %add.4 = add nsw i32 %load.4, %add.3
-; EPILOG-NEXT:    %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv.next.3, 1
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
+; EPILOG-NEXT:    %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5
 ; EPILOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.5
 ; EPILOG:       for.exiting_block.5:
 ; EPILOG-NEXT:    %cmp.5 = icmp eq i64 %n, 42
@@ -3922,8 +3813,7 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; EPILOG-NEXT:    %arrayidx.5 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.4
 ; EPILOG-NEXT:    %load.5 = load i32, ptr %arrayidx.5, align 4
 ; EPILOG-NEXT:    %add.5 = add nsw i32 %load.5, %add.4
-; EPILOG-NEXT:    %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv.next.4, 1
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
+; EPILOG-NEXT:    %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv, 6
 ; EPILOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.6
 ; EPILOG:       for.exiting_block.6:
 ; EPILOG-NEXT:    %cmp.6 = icmp eq i64 %n, 42
@@ -3932,8 +3822,7 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; EPILOG-NEXT:    %arrayidx.6 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.5
 ; EPILOG-NEXT:    %load.6 = load i32, ptr %arrayidx.6, align 4
 ; EPILOG-NEXT:    %add.6 = add nsw i32 %load.6, %add.5
-; EPILOG-NEXT:    %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv.next.5, 1
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
+; EPILOG-NEXT:    %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv, 7
 ; EPILOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.7
 ; EPILOG:       for.exiting_block.7:
 ; EPILOG-NEXT:    %cmp.7 = icmp eq i64 %n, 42
@@ -3942,8 +3831,8 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; EPILOG-NEXT:    %arrayidx.7 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.6
 ; EPILOG-NEXT:    %load.7 = load i32, ptr %arrayidx.7, align 4
 ; EPILOG-NEXT:    %add.7 = add nsw i32 %load.7, %add.6
-; EPILOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv.next.6, 1
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv, 8
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %latch_exit.unr-lcssa.loopexit, label %header
 ; EPILOG:       latch_exit.unr-lcssa.loopexit:
@@ -4020,7 +3909,6 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; EPILOG-BLOCK-NEXT:    %load = load i32, ptr %arrayidx, align 4
 ; EPILOG-BLOCK-NEXT:    %add = add nsw i32 %load, %sum.02
 ; EPILOG-BLOCK-NEXT:    %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.1
 ; EPILOG-BLOCK:       for.exiting_block.1:
 ; EPILOG-BLOCK-NEXT:    %cmp.1 = icmp eq i64 %n, 42
@@ -4029,8 +3917,8 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; EPILOG-BLOCK-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; EPILOG-BLOCK-NEXT:    %load.1 = load i32, ptr %arrayidx.1, align 4
 ; EPILOG-BLOCK-NEXT:    %add.1 = add nsw i32 %load.1, %add
-; EPILOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %latch_exit.unr-lcssa.loopexit, label %header, !llvm.loop !10
 ; EPILOG-BLOCK:       latch_exit.unr-lcssa.loopexit:
@@ -4130,7 +4018,7 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; PROLOG-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; PROLOG-NEXT:    %load.1 = load i32, ptr %arrayidx.1, align 4
 ; PROLOG-NEXT:    %add.1 = add nsw i32 %load.1, %add
-; PROLOG-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
+; PROLOG-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
 ; PROLOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.2
 ; PROLOG:       for.exiting_block.2:
 ; PROLOG-NEXT:    %cmp.2 = icmp eq i64 %n, 42
@@ -4139,7 +4027,7 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; PROLOG-NEXT:    %arrayidx.2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.1
 ; PROLOG-NEXT:    %load.2 = load i32, ptr %arrayidx.2, align 4
 ; PROLOG-NEXT:    %add.2 = add nsw i32 %load.2, %add.1
-; PROLOG-NEXT:    %indvars.iv.next.2 = add i64 %indvars.iv.next.1, 1
+; PROLOG-NEXT:    %indvars.iv.next.2 = add i64 %indvars.iv, 3
 ; PROLOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.3
 ; PROLOG:       for.exiting_block.3:
 ; PROLOG-NEXT:    %cmp.3 = icmp eq i64 %n, 42
@@ -4148,7 +4036,7 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; PROLOG-NEXT:    %arrayidx.3 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.2
 ; PROLOG-NEXT:    %load.3 = load i32, ptr %arrayidx.3, align 4
 ; PROLOG-NEXT:    %add.3 = add nsw i32 %load.3, %add.2
-; PROLOG-NEXT:    %indvars.iv.next.3 = add i64 %indvars.iv.next.2, 1
+; PROLOG-NEXT:    %indvars.iv.next.3 = add i64 %indvars.iv, 4
 ; PROLOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.4
 ; PROLOG:       for.exiting_block.4:
 ; PROLOG-NEXT:    %cmp.4 = icmp eq i64 %n, 42
@@ -4157,7 +4045,7 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; PROLOG-NEXT:    %arrayidx.4 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.3
 ; PROLOG-NEXT:    %load.4 = load i32, ptr %arrayidx.4, align 4
 ; PROLOG-NEXT:    %add.4 = add nsw i32 %load.4, %add.3
-; PROLOG-NEXT:    %indvars.iv.next.4 = add i64 %indvars.iv.next.3, 1
+; PROLOG-NEXT:    %indvars.iv.next.4 = add i64 %indvars.iv, 5
 ; PROLOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.5
 ; PROLOG:       for.exiting_block.5:
 ; PROLOG-NEXT:    %cmp.5 = icmp eq i64 %n, 42
@@ -4166,7 +4054,7 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; PROLOG-NEXT:    %arrayidx.5 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.4
 ; PROLOG-NEXT:    %load.5 = load i32, ptr %arrayidx.5, align 4
 ; PROLOG-NEXT:    %add.5 = add nsw i32 %load.5, %add.4
-; PROLOG-NEXT:    %indvars.iv.next.5 = add i64 %indvars.iv.next.4, 1
+; PROLOG-NEXT:    %indvars.iv.next.5 = add i64 %indvars.iv, 6
 ; PROLOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.6
 ; PROLOG:       for.exiting_block.6:
 ; PROLOG-NEXT:    %cmp.6 = icmp eq i64 %n, 42
@@ -4175,7 +4063,7 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; PROLOG-NEXT:    %arrayidx.6 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.5
 ; PROLOG-NEXT:    %load.6 = load i32, ptr %arrayidx.6, align 4
 ; PROLOG-NEXT:    %add.6 = add nsw i32 %load.6, %add.5
-; PROLOG-NEXT:    %indvars.iv.next.6 = add i64 %indvars.iv.next.5, 1
+; PROLOG-NEXT:    %indvars.iv.next.6 = add i64 %indvars.iv, 7
 ; PROLOG-NEXT:    br i1 false, label %for.exit2.loopexit, label %for.exiting_block.7
 ; PROLOG:       for.exiting_block.7:
 ; PROLOG-NEXT:    %cmp.7 = icmp eq i64 %n, 42
@@ -4184,7 +4072,7 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; PROLOG-NEXT:    %arrayidx.7 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.6
 ; PROLOG-NEXT:    %load.7 = load i32, ptr %arrayidx.7, align 4
 ; PROLOG-NEXT:    %add.7 = add nsw i32 %load.7, %add.6
-; PROLOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv.next.6, 1
+; PROLOG-NEXT:    %indvars.iv.next.7 = add i64 %indvars.iv, 8
 ; PROLOG-NEXT:    %exitcond.7 = icmp eq i64 %indvars.iv.next.7, %n
 ; PROLOG-NEXT:    br i1 %exitcond.7, label %latch_exit.unr-lcssa, label %header
 ; PROLOG:       latch_exit.unr-lcssa:
@@ -4253,7 +4141,7 @@ define i32 @test6(ptr nocapture %a, i64 %n, i1 %cond, i32 %x) {
 ; PROLOG-BLOCK-NEXT:    %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next
 ; PROLOG-BLOCK-NEXT:    %load.1 = load i32, ptr %arrayidx.1, align 4
 ; PROLOG-BLOCK-NEXT:    %add.1 = add nsw i32 %load.1, %add
-; PROLOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv.next, 1
+; PROLOG-BLOCK-NEXT:    %indvars.iv.next.1 = add i64 %indvars.iv, 2
 ; PROLOG-BLOCK-NEXT:    %exitcond.1 = icmp eq i64 %indvars.iv.next.1, %n
 ; PROLOG-BLOCK-NEXT:    br i1 %exitcond.1, label %latch_exit.unr-lcssa, label %header, !llvm.loop !10
 ; PROLOG-BLOCK:       latch_exit.unr-lcssa:
@@ -4334,36 +4222,22 @@ define i32 @test7(i32 %arg, i32 %arg1, i32 %arg2) {
 ; EPILOG-NEXT:    %niter = phi i64 [ 0, %preheader.new ], [ %niter.next.7, %latch.7 ]
 ; EPILOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch
 ; EPILOG:       latch:
-; EPILOG-NEXT:    %add = add nuw nsw i64 %i6, 1
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.1
 ; EPILOG:       latch.1:
-; EPILOG-NEXT:    %add.1 = add nuw nsw i64 %add, 1
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
 ; EPILOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.2
 ; EPILOG:       latch.2:
-; EPILOG-NEXT:    %add.2 = add nuw nsw i64 %add.1, 1
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
 ; EPILOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.3
 ; EPILOG:       latch.3:
-; EPILOG-NEXT:    %add.3 = add nuw nsw i64 %add.2, 1
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
 ; EPILOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.4
 ; EPILOG:       latch.4:
-; EPILOG-NEXT:    %add.4 = add nuw nsw i64 %add.3, 1
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
 ; EPILOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.5
 ; EPILOG:       latch.5:
-; EPILOG-NEXT:    %add.5 = add nuw nsw i64 %add.4, 1
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
 ; EPILOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.6
 ; EPILOG:       latch.6:
-; EPILOG-NEXT:    %add.6 = add nuw nsw i64 %add.5, 1
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
 ; EPILOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.7
 ; EPILOG:       latch.7:
-; EPILOG-NEXT:    %add.7 = add nuw nsw i64 %add.6, 1
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %add.7 = add nuw nsw i64 %i6, 8
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp ne i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %header, label %latchexit.unr-lcssa.loopexit
 ; EPILOG:       latchexit.unr-lcssa.loopexit:
@@ -4422,12 +4296,10 @@ define i32 @test7(i32 %arg, i32 %arg1, i32 %arg2) {
 ; EPILOG-BLOCK-NEXT:    %niter = phi i64 [ 0, %preheader.new ], [ %niter.next.1, %latch.1 ]
 ; EPILOG-BLOCK-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch
 ; EPILOG-BLOCK:       latch:
-; EPILOG-BLOCK-NEXT:    %add = add nuw nsw i64 %i6, 1
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.1
 ; EPILOG-BLOCK:       latch.1:
-; EPILOG-BLOCK-NEXT:    %add.1 = add nuw nsw i64 %add, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %add.1 = add nuw nsw i64 %i6, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp ne i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %header, label %latchexit.unr-lcssa.loopexit, !llvm.loop !11
 ; EPILOG-BLOCK:       latchexit.unr-lcssa.loopexit:
@@ -4490,28 +4362,21 @@ define i32 @test7(i32 %arg, i32 %arg1, i32 %arg2) {
 ; PROLOG-NEXT:    %i6 = phi i64 [ %i6.unr, %preheader.new ], [ %add.7, %latch.7 ]
 ; PROLOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch
 ; PROLOG:       latch:
-; PROLOG-NEXT:    %add = add nuw nsw i64 %i6, 1
 ; PROLOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.1
 ; PROLOG:       latch.1:
-; PROLOG-NEXT:    %add.1 = add nuw nsw i64 %add, 1
 ; PROLOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.2
 ; PROLOG:       latch.2:
-; PROLOG-NEXT:    %add.2 = add nuw nsw i64 %add.1, 1
 ; PROLOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.3
 ; PROLOG:       latch.3:
-; PROLOG-NEXT:    %add.3 = add nuw nsw i64 %add.2, 1
 ; PROLOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.4
 ; PROLOG:       latch.4:
-; PROLOG-NEXT:    %add.4 = add nuw nsw i64 %add.3, 1
 ; PROLOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.5
 ; PROLOG:       latch.5:
-; PROLOG-NEXT:    %add.5 = add nuw nsw i64 %add.4, 1
 ; PROLOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.6
 ; PROLOG:       latch.6:
-; PROLOG-NEXT:    %add.6 = add nuw nsw i64 %add.5, 1
 ; PROLOG-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.7
 ; PROLOG:       latch.7:
-; PROLOG-NEXT:    %add.7 = add nuw nsw i64 %add.6, 1
+; PROLOG-NEXT:    %add.7 = add nuw nsw i64 %i6, 8
 ; PROLOG-NEXT:    %i9.7 = icmp slt i64 %add.7, %sext
 ; PROLOG-NEXT:    br i1 %i9.7, label %header, label %latchexit.unr-lcssa
 ; PROLOG:       latchexit.unr-lcssa:
@@ -4559,10 +4424,9 @@ define i32 @test7(i32 %arg, i32 %arg1, i32 %arg2) {
 ; PROLOG-BLOCK-NEXT:    %i6 = phi i64 [ %i6.unr, %preheader.new ], [ %add.1, %latch.1 ]
 ; PROLOG-BLOCK-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch
 ; PROLOG-BLOCK:       latch:
-; PROLOG-BLOCK-NEXT:    %add = add nuw nsw i64 %i6, 1
 ; PROLOG-BLOCK-NEXT:    br i1 false, label %loopexit1.loopexit, label %latch.1
 ; PROLOG-BLOCK:       latch.1:
-; PROLOG-BLOCK-NEXT:    %add.1 = add nuw nsw i64 %add, 1
+; PROLOG-BLOCK-NEXT:    %add.1 = add nuw nsw i64 %i6, 2
 ; PROLOG-BLOCK-NEXT:    %i9.1 = icmp slt i64 %add.1, %sext
 ; PROLOG-BLOCK-NEXT:    br i1 %i9.1, label %header, label %latchexit.unr-lcssa, !llvm.loop !11
 ; PROLOG-BLOCK:       latchexit.unr-lcssa:
@@ -4633,38 +4497,24 @@ define void @test8() {
 ; EPILOG:       innerH:
 ; EPILOG-NEXT:    %i3 = phi i64 [ %i, %outerloop.new ], [ %i4.7, %latch.7 ]
 ; EPILOG-NEXT:    %niter = phi i64 [ 0, %outerloop.new ], [ %niter.next.7, %latch.7 ]
-; EPILOG-NEXT:    %i4 = add nuw nsw i64 %i3, 1
 ; EPILOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch
 ; EPILOG:       latch:
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
-; EPILOG-NEXT:    %i4.1 = add nuw nsw i64 %i4, 1
 ; EPILOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.1
 ; EPILOG:       latch.1:
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
-; EPILOG-NEXT:    %i4.2 = add nuw nsw i64 %i4.1, 1
 ; EPILOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.2
 ; EPILOG:       latch.2:
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
-; EPILOG-NEXT:    %i4.3 = add nuw nsw i64 %i4.2, 1
 ; EPILOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.3
 ; EPILOG:       latch.3:
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
-; EPILOG-NEXT:    %i4.4 = add nuw nsw i64 %i4.3, 1
 ; EPILOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.4
 ; EPILOG:       latch.4:
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
-; EPILOG-NEXT:    %i4.5 = add nuw nsw i64 %i4.4, 1
 ; EPILOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.5
 ; EPILOG:       latch.5:
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
-; EPILOG-NEXT:    %i4.6 = add nuw nsw i64 %i4.5, 1
 ; EPILOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.6
 ; EPILOG:       latch.6:
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
-; EPILOG-NEXT:    %i4.7 = add nuw nsw i64 %i4.6, 1
+; EPILOG-NEXT:    %i4.7 = add nuw nsw i64 %i3, 8
 ; EPILOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.7
 ; EPILOG:       latch.7:
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp ne i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %innerH, label %exit.unr-lcssa.loopexit
 ; EPILOG:       exit.unr-lcssa.loopexit:
@@ -4705,14 +4555,12 @@ define void @test8() {
 ; EPILOG-BLOCK:       innerH.1:
 ; EPILOG-BLOCK-NEXT:    %i3.1 = phi i64 [ 0, %outerloop.new.1 ], [ %i4.1.1, %latch.1.1 ]
 ; EPILOG-BLOCK-NEXT:    %niter.1 = phi i64 [ 0, %outerloop.new.1 ], [ %niter.next.1.1, %latch.1.1 ]
-; EPILOG-BLOCK-NEXT:    %i4.12 = add nuw nsw i64 %i3.1, 1
-; EPILOG-BLOCK-NEXT:    br i1 false, label %outerloop.loopexit.loopexit.1, label %latch.14
-; EPILOG-BLOCK:       latch.14:
-; EPILOG-BLOCK-NEXT:    %niter.next.13 = add nuw nsw i64 %niter.1, 1
-; EPILOG-BLOCK-NEXT:    %i4.1.1 = add nuw nsw i64 %i4.12, 1
+; EPILOG-BLOCK-NEXT:    br i1 false, label %outerloop.loopexit.loopexit.1, label %latch.12
+; EPILOG-BLOCK:       latch.12:
+; EPILOG-BLOCK-NEXT:    %i4.1.1 = add nuw nsw i64 %i3.1, 2
 ; EPILOG-BLOCK-NEXT:    br i1 false, label %outerloop.loopexit.loopexit.1, label %latch.1.1
 ; EPILOG-BLOCK:       latch.1.1:
-; EPILOG-BLOCK-NEXT:    %niter.next.1.1 = add i64 %niter.next.13, 1
+; EPILOG-BLOCK-NEXT:    %niter.next.1.1 = add i64 %niter.1, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1.1 = icmp ne i64 %niter.next.1.1, 100
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1.1, label %innerH.1, label %exit.unr-lcssa.loopexit.1, !llvm.loop !12
 ; EPILOG-BLOCK:       exit.unr-lcssa.loopexit.1:
@@ -4740,14 +4588,12 @@ define void @test8() {
 ; EPILOG-BLOCK:       innerH:
 ; EPILOG-BLOCK-NEXT:    %i3 = phi i64 [ %i, %outerloop.new ], [ %i4.1, %latch.1 ]
 ; EPILOG-BLOCK-NEXT:    %niter = phi i64 [ 0, %outerloop.new ], [ %niter.next.1, %latch.1 ]
-; EPILOG-BLOCK-NEXT:    %i4 = add nuw nsw i64 %i3, 1
 ; EPILOG-BLOCK-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch
 ; EPILOG-BLOCK:       latch:
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
-; EPILOG-BLOCK-NEXT:    %i4.1 = add nuw nsw i64 %i4, 1
+; EPILOG-BLOCK-NEXT:    %i4.1 = add nuw nsw i64 %i3, 2
 ; EPILOG-BLOCK-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.1
 ; EPILOG-BLOCK:       latch.1:
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp ne i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %innerH, label %exit.unr-lcssa.loopexit, !llvm.loop !12
 ; EPILOG-BLOCK:       exit.unr-lcssa.loopexit:
@@ -4805,28 +4651,21 @@ define void @test8() {
 ; PROLOG-NEXT:    br label %innerH
 ; PROLOG:       innerH:
 ; PROLOG-NEXT:    %i3 = phi i64 [ %i3.unr, %outerloop.new ], [ %i4.7, %latch.7 ]
-; PROLOG-NEXT:    %i4 = add nuw nsw i64 %i3, 1
 ; PROLOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch
 ; PROLOG:       latch:
-; PROLOG-NEXT:    %i4.1 = add nuw nsw i64 %i4, 1
 ; PROLOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.1
 ; PROLOG:       latch.1:
-; PROLOG-NEXT:    %i4.2 = add nuw nsw i64 %i4.1, 1
 ; PROLOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.2
 ; PROLOG:       latch.2:
-; PROLOG-NEXT:    %i4.3 = add nuw nsw i64 %i4.2, 1
 ; PROLOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.3
 ; PROLOG:       latch.3:
-; PROLOG-NEXT:    %i4.4 = add nuw nsw i64 %i4.3, 1
 ; PROLOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.4
 ; PROLOG:       latch.4:
-; PROLOG-NEXT:    %i4.5 = add nuw nsw i64 %i4.4, 1
 ; PROLOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.5
 ; PROLOG:       latch.5:
-; PROLOG-NEXT:    %i4.6 = add nuw nsw i64 %i4.5, 1
 ; PROLOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.6
 ; PROLOG:       latch.6:
-; PROLOG-NEXT:    %i4.7 = add nuw nsw i64 %i4.6, 1
+; PROLOG-NEXT:    %i4.7 = add nuw nsw i64 %i3, 8
 ; PROLOG-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.7
 ; PROLOG:       latch.7:
 ; PROLOG-NEXT:    %i6.7 = icmp ult i64 %i4.7, 100
@@ -4858,14 +4697,13 @@ define void @test8() {
 ; PROLOG-BLOCK-NEXT:    br label %innerH.1
 ; PROLOG-BLOCK:       innerH.1:
 ; PROLOG-BLOCK-NEXT:    %i3.1 = phi i64 [ %i3.unr.1, %outerloop.new.1 ], [ %i4.1.1, %latch.1.1 ]
-; PROLOG-BLOCK-NEXT:    %i4.11 = add nuw nsw i64 %i3.1, 1
-; PROLOG-BLOCK-NEXT:    br i1 false, label %outerloop.loopexit.loopexit.1, label %latch.12
-; PROLOG-BLOCK:       latch.12:
-; PROLOG-BLOCK-NEXT:    %i4.1.1 = add nuw nsw i64 %i4.11, 1
+; PROLOG-BLOCK-NEXT:    br i1 false, label %outerloop.loopexit.loopexit.1, label %latch.11
+; PROLOG-BLOCK:       latch.11:
+; PROLOG-BLOCK-NEXT:    %i4.1.1 = add nuw nsw i64 %i3.1, 2
 ; PROLOG-BLOCK-NEXT:    br i1 false, label %outerloop.loopexit.loopexit.1, label %latch.1.1
 ; PROLOG-BLOCK:       latch.1.1:
 ; PROLOG-BLOCK-NEXT:    %i6.1.1 = icmp ult i64 %i4.1.1, 100
-; PROLOG-BLOCK-NEXT:    br i1 %i6.1.1, label %innerH.1, label %exit.unr-lcssa.loopexit3, !llvm.loop !12
+; PROLOG-BLOCK-NEXT:    br i1 %i6.1.1, label %innerH.1, label %exit.unr-lcssa.loopexit2, !llvm.loop !12
 ; PROLOG-BLOCK:       outerloop.loopexit.loopexit.1:
 ; PROLOG-BLOCK-NEXT:    br label %outerloop.loopexit.1
 ; PROLOG-BLOCK:       outerloop.loopexit.1:
@@ -4892,17 +4730,16 @@ define void @test8() {
 ; PROLOG-BLOCK-NEXT:    br label %innerH
 ; PROLOG-BLOCK:       innerH:
 ; PROLOG-BLOCK-NEXT:    %i3 = phi i64 [ %i3.unr, %outerloop.new ], [ %i4.1, %latch.1 ]
-; PROLOG-BLOCK-NEXT:    %i4 = add nuw nsw i64 %i3, 1
 ; PROLOG-BLOCK-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch
 ; PROLOG-BLOCK:       latch:
-; PROLOG-BLOCK-NEXT:    %i4.1 = add nuw nsw i64 %i4, 1
+; PROLOG-BLOCK-NEXT:    %i4.1 = add nuw nsw i64 %i3, 2
 ; PROLOG-BLOCK-NEXT:    br i1 false, label %outerloop.loopexit.loopexit, label %latch.1
 ; PROLOG-BLOCK:       latch.1:
 ; PROLOG-BLOCK-NEXT:    %i6.1 = icmp ult i64 %i4.1, 100
 ; PROLOG-BLOCK-NEXT:    br i1 %i6.1, label %innerH, label %exit.unr-lcssa.loopexit, !llvm.loop !12
 ; PROLOG-BLOCK:       exit.unr-lcssa.loopexit:
 ; PROLOG-BLOCK-NEXT:    br label %exit.unr-lcssa
-; PROLOG-BLOCK:       exit.unr-lcssa.loopexit3:
+; PROLOG-BLOCK:       exit.unr-lcssa.loopexit2:
 ; PROLOG-BLOCK-NEXT:    br label %exit.unr-lcssa
 ; PROLOG-BLOCK:       exit.unr-lcssa:
 ; PROLOG-BLOCK-NEXT:    br label %exit
@@ -4970,36 +4807,22 @@ define ptr addrspace(1) @test9(ptr nocapture readonly %arg, i32 %n) {
 ; EPILOG-NEXT:    %i9 = call ptr addrspace(1) @foo(i32 %trip.lcssa)
 ; EPILOG-NEXT:    ret ptr addrspace(1) %i9
 ; EPILOG:       latch:
-; EPILOG-NEXT:    %iv.next = add nuw nsw i64 %phi, 1
-; EPILOG-NEXT:    %niter.next = add nuw nsw i32 %niter, 1
 ; EPILOG-NEXT:    br i1 true, label %latch.1, label %innerexit.loopexit
 ; EPILOG:       latch.1:
-; EPILOG-NEXT:    %iv.next.1 = add nuw nsw i64 %iv.next, 1
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i32 %niter.next, 1
 ; EPILOG-NEXT:    br i1 true, label %latch.2, label %innerexit.loopexit
 ; EPILOG:       latch.2:
-; EPILOG-NEXT:    %iv.next.2 = add nuw nsw i64 %iv.next.1, 1
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i32 %niter.next.1, 1
 ; EPILOG-NEXT:    br i1 true, label %latch.3, label %innerexit.loopexit
 ; EPILOG:       latch.3:
-; EPILOG-NEXT:    %iv.next.3 = add nuw nsw i64 %iv.next.2, 1
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i32 %niter.next.2, 1
 ; EPILOG-NEXT:    br i1 true, label %latch.4, label %innerexit.loopexit
 ; EPILOG:       latch.4:
-; EPILOG-NEXT:    %iv.next.4 = add nuw nsw i64 %iv.next.3, 1
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i32 %niter.next.3, 1
 ; EPILOG-NEXT:    br i1 true, label %latch.5, label %innerexit.loopexit
 ; EPILOG:       latch.5:
-; EPILOG-NEXT:    %iv.next.5 = add nuw nsw i64 %iv.next.4, 1
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i32 %niter.next.4, 1
 ; EPILOG-NEXT:    br i1 true, label %latch.6, label %innerexit.loopexit
 ; EPILOG:       latch.6:
-; EPILOG-NEXT:    %iv.next.6 = add nuw nsw i64 %iv.next.5, 1
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i32 %niter.next.5, 1
 ; EPILOG-NEXT:    br i1 true, label %latch.7, label %innerexit.loopexit
 ; EPILOG:       latch.7:
-; EPILOG-NEXT:    %iv.next.7 = add nuw nsw i64 %iv.next.6, 1
-; EPILOG-NEXT:    %niter.next.7 = add i32 %niter.next.6, 1
+; EPILOG-NEXT:    %iv.next.7 = add nuw nsw i64 %phi, 8
+; EPILOG-NEXT:    %niter.next.7 = add i32 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp ne i32 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %header, label %outerLatch.loopexit.unr-lcssa.loopexit
 ; EPILOG:       outerLatch.loopexit.unr-lcssa.loopexit:
@@ -5054,11 +4877,11 @@ define ptr addrspace(1) @test9(ptr nocapture readonly %arg, i32 %n) {
 ; EPILOG-BLOCK:       innerexit.loopexit.loopexit:
 ; EPILOG-BLOCK-NEXT:    %trip.lcssa.ph.ph = phi i32 [ %trip, %latch ], [ %trip, %header ]
 ; EPILOG-BLOCK-NEXT:    br label %innerexit.loopexit
-; EPILOG-BLOCK:       innerexit.loopexit.loopexit6:
-; EPILOG-BLOCK-NEXT:    %trip.lcssa.ph.ph7 = phi i32 [ %trip.1, %latch.15 ], [ %trip.1, %header.1 ]
+; EPILOG-BLOCK:       innerexit.loopexit.loopexit4:
+; EPILOG-BLOCK-NEXT:    %trip.lcssa.ph.ph5 = phi i32 [ %trip.1, %latch.13 ], [ %trip.1, %header.1 ]
 ; EPILOG-BLOCK-NEXT:    br label %innerexit.loopexit
 ; EPILOG-BLOCK:       innerexit.loopexit:
-; EPILOG-BLOCK-NEXT:    %trip.lcssa.ph = phi i32 [ %trip.lcssa.ph.ph, %innerexit.loopexit.loopexit ], [ %trip.lcssa.ph.ph7, %innerexit.loopexit.loopexit6 ]
+; EPILOG-BLOCK-NEXT:    %trip.lcssa.ph = phi i32 [ %trip.lcssa.ph.ph, %innerexit.loopexit.loopexit ], [ %trip.lcssa.ph.ph5, %innerexit.loopexit.loopexit4 ]
 ; EPILOG-BLOCK-NEXT:    br label %innerexit
 ; EPILOG-BLOCK:       innerexit.loopexit1:
 ; EPILOG-BLOCK-NEXT:    %trip.lcssa.ph2 = phi i32 [ %trip, %header.epil ], [ %trip.1, %header.epil.1 ]
@@ -5068,12 +4891,10 @@ define ptr addrspace(1) @test9(ptr nocapture readonly %arg, i32 %n) {
 ; EPILOG-BLOCK-NEXT:    %i9 = call ptr addrspace(1) @foo(i32 %trip.lcssa)
 ; EPILOG-BLOCK-NEXT:    ret ptr addrspace(1) %i9
 ; EPILOG-BLOCK:       latch:
-; EPILOG-BLOCK-NEXT:    %iv.next = add nuw nsw i64 %phi, 1
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i32 %niter, 1
 ; EPILOG-BLOCK-NEXT:    br i1 true, label %latch.1, label %innerexit.loopexit.loopexit
 ; EPILOG-BLOCK:       latch.1:
-; EPILOG-BLOCK-NEXT:    %iv.next.1 = add nuw nsw i64 %iv.next, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i32 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %iv.next.1 = add nuw nsw i64 %phi, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i32 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp ne i32 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %header, label %outerLatch.loopexit.unr-lcssa.loopexit, !llvm.loop !14
 ; EPILOG-BLOCK:       outerLatch.loopexit.unr-lcssa.loopexit:
@@ -5105,14 +4926,12 @@ define ptr addrspace(1) @test9(ptr nocapture readonly %arg, i32 %n) {
 ; EPILOG-BLOCK:       header.1:
 ; EPILOG-BLOCK-NEXT:    %phi.1 = phi i64 [ 0, %preheader.new.1 ], [ %iv.next.1.1, %latch.1.1 ]
 ; EPILOG-BLOCK-NEXT:    %niter.1 = phi i32 [ 0, %preheader.new.1 ], [ %niter.next.1.1, %latch.1.1 ]
-; EPILOG-BLOCK-NEXT:    br i1 true, label %latch.15, label %innerexit.loopexit.loopexit6
-; EPILOG-BLOCK:       latch.15:
-; EPILOG-BLOCK-NEXT:    %iv.next.13 = add nuw nsw i64 %phi.1, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.14 = add nuw nsw i32 %niter.1, 1
-; EPILOG-BLOCK-NEXT:    br i1 true, label %latch.1.1, label %innerexit.loopexit.loopexit6
+; EPILOG-BLOCK-NEXT:    br i1 true, label %latch.13, label %innerexit.loopexit.loopexit4
+; EPILOG-BLOCK:       latch.13:
+; EPILOG-BLOCK-NEXT:    br i1 true, label %latch.1.1, label %innerexit.loopexit.loopexit4
 ; EPILOG-BLOCK:       latch.1.1:
-; EPILOG-BLOCK-NEXT:    %iv.next.1.1 = add nuw nsw i64 %iv.next.13, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1.1 = add i32 %niter.next.14, 1
+; EPILOG-BLOCK-NEXT:    %iv.next.1.1 = add nuw nsw i64 %phi.1, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1.1 = add i32 %niter.1, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1.1 = icmp ne i32 %niter.next.1.1, %unroll_iter.1
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1.1, label %header.1, label %outerLatch.loopexit.unr-lcssa.loopexit.1, !llvm.loop !14
 ; EPILOG-BLOCK:       outerLatch.loopexit.unr-lcssa.loopexit.1:
@@ -5183,31 +5002,25 @@ define ptr addrspace(1) @test9(ptr nocapture readonly %arg, i32 %n) {
 ; PROLOG-NEXT:    %i9 = call ptr addrspace(1) @foo(i32 %trip.lcssa)
 ; PROLOG-NEXT:    ret ptr addrspace(1) %i9
 ; PROLOG:       latch:
-; PROLOG-NEXT:    %iv.next = add nuw nsw i64 %phi, 1
 ; PROLOG-NEXT:    br i1 true, label %latch.1, label %innerexit.loopexit
 ; PROLOG:       latch.1:
-; PROLOG-NEXT:    %iv.next.1 = add nuw nsw i64 %iv.next, 1
 ; PROLOG-NEXT:    br i1 true, label %latch.2, label %innerexit.loopexit
 ; PROLOG:       latch.2:
-; PROLOG-NEXT:    %iv.next.2 = add nuw nsw i64 %iv.next.1, 1
 ; PROLOG-NEXT:    br i1 true, label %latch.3, label %innerexit.loopexit
 ; PROLOG:       latch.3:
-; PROLOG-NEXT:    %iv.next.3 = add nuw nsw i64 %iv.next.2, 1
 ; PROLOG-NEXT:    br i1 true, label %latch.4, label %innerexit.loopexit
 ; PROLOG:       latch.4:
-; PROLOG-NEXT:    %iv.next.4 = add nuw nsw i64 %iv.next.3, 1
 ; PROLOG-NEXT:    br i1 true, label %latch.5, label %innerexit.loopexit
 ; PROLOG:       latch.5:
-; PROLOG-NEXT:    %iv.next.5 = add nuw nsw i64 %iv.next.4, 1
 ; PROLOG-NEXT:    br i1 true, label %latch.6, label %innerexit.loopexit
 ; PROLOG:       latch.6:
-; PROLOG-NEXT:    %iv.next.6 = add nuw nsw i64 %iv.next.5, 1
+; PROLOG-NEXT:    %iv.next.6 = add nuw nsw i64 %phi, 7
 ; PROLOG-NEXT:    %i7.7 = trunc i64 %iv.next.6 to i32
 ; PROLOG-NEXT:    br i1 true, label %latch.7, label %innerexit.loopexit
 ; PROLOG:       latch.7:
 ; PROLOG-NEXT:    %i11.7 = add nsw i32 %i7.7, 1
 ; PROLOG-NEXT:    %innercnd.7 = icmp slt i32 %i11.7, %trip
-; PROLOG-NEXT:    %iv.next.7 = add nuw nsw i64 %iv.next.6, 1
+; PROLOG-NEXT:    %iv.next.7 = add nuw nsw i64 %phi, 8
 ; PROLOG-NEXT:    br i1 %innercnd.7, label %header, label %outerLatch.loopexit.unr-lcssa
 ; PROLOG:       outerLatch.loopexit.unr-lcssa:
 ; PROLOG-NEXT:    br label %outerLatch.loopexit
@@ -5268,7 +5081,7 @@ define ptr addrspace(1) @test9(ptr nocapture readonly %arg, i32 %n) {
 ; PROLOG-BLOCK:       latch.1:
 ; PROLOG-BLOCK-NEXT:    %i11.1 = add nsw i32 %i7.1, 1
 ; PROLOG-BLOCK-NEXT:    %innercnd.1 = icmp slt i32 %i11.1, %trip
-; PROLOG-BLOCK-NEXT:    %iv.next.1 = add nuw nsw i64 %iv.next, 1
+; PROLOG-BLOCK-NEXT:    %iv.next.1 = add nuw nsw i64 %phi, 2
 ; PROLOG-BLOCK-NEXT:    br i1 %innercnd.1, label %header, label %outerLatch.loopexit.unr-lcssa, !llvm.loop !14
 ; PROLOG-BLOCK:       outerLatch.loopexit.unr-lcssa:
 ; PROLOG-BLOCK-NEXT:    br label %outerLatch.loopexit
@@ -5306,7 +5119,7 @@ define ptr addrspace(1) @test9(ptr nocapture readonly %arg, i32 %n) {
 ; PROLOG-BLOCK:       latch.1.1:
 ; PROLOG-BLOCK-NEXT:    %i11.1.1 = add nsw i32 %i7.1.1, 1
 ; PROLOG-BLOCK-NEXT:    %innercnd.1.1 = icmp slt i32 %i11.1.1, %trip.1
-; PROLOG-BLOCK-NEXT:    %iv.next.1.1 = add nuw nsw i64 %iv.next.13, 1
+; PROLOG-BLOCK-NEXT:    %iv.next.1.1 = add nuw nsw i64 %phi.1, 2
 ; PROLOG-BLOCK-NEXT:    br i1 %innercnd.1.1, label %header.1, label %outerLatch.loopexit.unr-lcssa.1, !llvm.loop !14
 ; PROLOG-BLOCK:       outerLatch.loopexit.unr-lcssa.1:
 ; PROLOG-BLOCK-NEXT:    br label %outerLatch.loopexit.1
@@ -5370,49 +5183,42 @@ define void @test10(i64 %trip, i64 %trip2) {
 ; EPILOG-NEXT:    br i1 %cmp_early, label %loop_latch, label %exit1.loopexit
 ; EPILOG:       loop_latch:
 ; EPILOG-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.1 = icmp ne i64 %iv_next, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.1, label %loop_latch.1, label %exit1.loopexit
 ; EPILOG:       loop_latch.1:
-; EPILOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv_next, 1
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
+; EPILOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv, 2
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.2 = icmp ne i64 %iv_next.1, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.2, label %loop_latch.2, label %exit1.loopexit
 ; EPILOG:       loop_latch.2:
-; EPILOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv_next.1, 1
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
+; EPILOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv, 3
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.3 = icmp ne i64 %iv_next.2, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.3, label %loop_latch.3, label %exit1.loopexit
 ; EPILOG:       loop_latch.3:
-; EPILOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv_next.2, 1
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
+; EPILOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv, 4
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.4 = icmp ne i64 %iv_next.3, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.4, label %loop_latch.4, label %exit1.loopexit
 ; EPILOG:       loop_latch.4:
-; EPILOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv_next.3, 1
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
+; EPILOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv, 5
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.5 = icmp ne i64 %iv_next.4, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.5, label %loop_latch.5, label %exit1.loopexit
 ; EPILOG:       loop_latch.5:
-; EPILOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv_next.4, 1
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
+; EPILOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv, 6
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.6 = icmp ne i64 %iv_next.5, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.6, label %loop_latch.6, label %exit1.loopexit
 ; EPILOG:       loop_latch.6:
-; EPILOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv_next.5, 1
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
+; EPILOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv, 7
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.7 = icmp ne i64 %iv_next.6, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.7, label %loop_latch.7, label %exit1.loopexit
 ; EPILOG:       loop_latch.7:
-; EPILOG-NEXT:    %iv_next.7 = add i64 %iv_next.6, 1
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %iv_next.7 = add i64 %iv, 8
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp ne i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %loop_header, label %exit2.unr-lcssa.loopexit
 ; EPILOG:       exit1.loopexit:
@@ -5465,13 +5271,12 @@ define void @test10(i64 %trip, i64 %trip2) {
 ; EPILOG-BLOCK-NEXT:    br i1 %cmp_early, label %loop_latch, label %exit1.loopexit
 ; EPILOG-BLOCK:       loop_latch:
 ; EPILOG-BLOCK-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    call void @bar()
 ; EPILOG-BLOCK-NEXT:    %cmp_early.1 = icmp ne i64 %iv_next, %trip2
 ; EPILOG-BLOCK-NEXT:    br i1 %cmp_early.1, label %loop_latch.1, label %exit1.loopexit
 ; EPILOG-BLOCK:       loop_latch.1:
-; EPILOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv_next, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp ne i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %loop_header, label %exit2.unr-lcssa.loopexit, !llvm.loop !16
 ; EPILOG-BLOCK:       exit1.loopexit:
@@ -5537,37 +5342,37 @@ define void @test10(i64 %trip, i64 %trip2) {
 ; PROLOG-NEXT:    %cmp_early.1 = icmp ne i64 %iv_next, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.1, label %loop_latch.1, label %exit1.loopexit
 ; PROLOG:       loop_latch.1:
-; PROLOG-NEXT:    %iv_next.1 = add i64 %iv_next, 1
+; PROLOG-NEXT:    %iv_next.1 = add i64 %iv, 2
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.2 = icmp ne i64 %iv_next.1, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.2, label %loop_latch.2, label %exit1.loopexit
 ; PROLOG:       loop_latch.2:
-; PROLOG-NEXT:    %iv_next.2 = add i64 %iv_next.1, 1
+; PROLOG-NEXT:    %iv_next.2 = add i64 %iv, 3
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.3 = icmp ne i64 %iv_next.2, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.3, label %loop_latch.3, label %exit1.loopexit
 ; PROLOG:       loop_latch.3:
-; PROLOG-NEXT:    %iv_next.3 = add i64 %iv_next.2, 1
+; PROLOG-NEXT:    %iv_next.3 = add i64 %iv, 4
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.4 = icmp ne i64 %iv_next.3, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.4, label %loop_latch.4, label %exit1.loopexit
 ; PROLOG:       loop_latch.4:
-; PROLOG-NEXT:    %iv_next.4 = add i64 %iv_next.3, 1
+; PROLOG-NEXT:    %iv_next.4 = add i64 %iv, 5
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.5 = icmp ne i64 %iv_next.4, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.5, label %loop_latch.5, label %exit1.loopexit
 ; PROLOG:       loop_latch.5:
-; PROLOG-NEXT:    %iv_next.5 = add i64 %iv_next.4, 1
+; PROLOG-NEXT:    %iv_next.5 = add i64 %iv, 6
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.6 = icmp ne i64 %iv_next.5, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.6, label %loop_latch.6, label %exit1.loopexit
 ; PROLOG:       loop_latch.6:
-; PROLOG-NEXT:    %iv_next.6 = add i64 %iv_next.5, 1
+; PROLOG-NEXT:    %iv_next.6 = add i64 %iv, 7
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.7 = icmp ne i64 %iv_next.6, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.7, label %loop_latch.7, label %exit1.loopexit
 ; PROLOG:       loop_latch.7:
-; PROLOG-NEXT:    %iv_next.7 = add i64 %iv_next.6, 1
+; PROLOG-NEXT:    %iv_next.7 = add i64 %iv, 8
 ; PROLOG-NEXT:    %cmp.7 = icmp ne i64 %iv_next.7, %trip
 ; PROLOG-NEXT:    br i1 %cmp.7, label %loop_header, label %exit2.unr-lcssa
 ; PROLOG:       exit1.loopexit:
@@ -5613,7 +5418,7 @@ define void @test10(i64 %trip, i64 %trip2) {
 ; PROLOG-BLOCK-NEXT:    %cmp_early.1 = icmp ne i64 %iv_next, %trip2
 ; PROLOG-BLOCK-NEXT:    br i1 %cmp_early.1, label %loop_latch.1, label %exit1.loopexit
 ; PROLOG-BLOCK:       loop_latch.1:
-; PROLOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv_next, 1
+; PROLOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv, 2
 ; PROLOG-BLOCK-NEXT:    %cmp.1 = icmp ne i64 %iv_next.1, %trip
 ; PROLOG-BLOCK-NEXT:    br i1 %cmp.1, label %loop_header, label %exit2.unr-lcssa, !llvm.loop !16
 ; PROLOG-BLOCK:       exit1.loopexit:
@@ -5665,43 +5470,29 @@ define void @test11(i64 %trip, i1 %cond) {
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch, label %exit1.loopexit
 ; EPILOG:       loop_latch:
-; EPILOG-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.1, label %exit1.loopexit
 ; EPILOG:       loop_latch.1:
-; EPILOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv_next, 1
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.2, label %exit1.loopexit
 ; EPILOG:       loop_latch.2:
-; EPILOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv_next.1, 1
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.3, label %exit1.loopexit
 ; EPILOG:       loop_latch.3:
-; EPILOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv_next.2, 1
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.4, label %exit1.loopexit
 ; EPILOG:       loop_latch.4:
-; EPILOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv_next.3, 1
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.5, label %exit1.loopexit
 ; EPILOG:       loop_latch.5:
-; EPILOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv_next.4, 1
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.6, label %exit1.loopexit
 ; EPILOG:       loop_latch.6:
-; EPILOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv_next.5, 1
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.7, label %exit1.loopexit
 ; EPILOG:       loop_latch.7:
-; EPILOG-NEXT:    %iv_next.7 = add i64 %iv_next.6, 1
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %iv_next.7 = add i64 %iv, 8
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp ne i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %loop_header, label %exit2.unr-lcssa.loopexit
 ; EPILOG:       exit1.loopexit:
@@ -5751,13 +5542,11 @@ define void @test11(i64 %trip, i1 %cond) {
 ; EPILOG-BLOCK-NEXT:    call void @bar()
 ; EPILOG-BLOCK-NEXT:    br i1 %cond, label %loop_latch, label %exit1.loopexit
 ; EPILOG-BLOCK:       loop_latch:
-; EPILOG-BLOCK-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    call void @bar()
 ; EPILOG-BLOCK-NEXT:    br i1 %cond, label %loop_latch.1, label %exit1.loopexit
 ; EPILOG-BLOCK:       loop_latch.1:
-; EPILOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv_next, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp ne i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %loop_header, label %exit2.unr-lcssa.loopexit, !llvm.loop !17
 ; EPILOG-BLOCK:       exit1.loopexit:
@@ -5813,35 +5602,28 @@ define void @test11(i64 %trip, i1 %cond) {
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch, label %exit1.loopexit
 ; PROLOG:       loop_latch:
-; PROLOG-NEXT:    %iv_next = add i64 %iv, 1
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.1, label %exit1.loopexit
 ; PROLOG:       loop_latch.1:
-; PROLOG-NEXT:    %iv_next.1 = add i64 %iv_next, 1
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.2, label %exit1.loopexit
 ; PROLOG:       loop_latch.2:
-; PROLOG-NEXT:    %iv_next.2 = add i64 %iv_next.1, 1
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.3, label %exit1.loopexit
 ; PROLOG:       loop_latch.3:
-; PROLOG-NEXT:    %iv_next.3 = add i64 %iv_next.2, 1
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.4, label %exit1.loopexit
 ; PROLOG:       loop_latch.4:
-; PROLOG-NEXT:    %iv_next.4 = add i64 %iv_next.3, 1
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.5, label %exit1.loopexit
 ; PROLOG:       loop_latch.5:
-; PROLOG-NEXT:    %iv_next.5 = add i64 %iv_next.4, 1
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.6, label %exit1.loopexit
 ; PROLOG:       loop_latch.6:
-; PROLOG-NEXT:    %iv_next.6 = add i64 %iv_next.5, 1
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.7, label %exit1.loopexit
 ; PROLOG:       loop_latch.7:
-; PROLOG-NEXT:    %iv_next.7 = add i64 %iv_next.6, 1
+; PROLOG-NEXT:    %iv_next.7 = add i64 %iv, 8
 ; PROLOG-NEXT:    %cmp.7 = icmp ne i64 %iv_next.7, %trip
 ; PROLOG-NEXT:    br i1 %cmp.7, label %loop_header, label %exit2.unr-lcssa
 ; PROLOG:       exit1.loopexit:
@@ -5880,11 +5662,10 @@ define void @test11(i64 %trip, i1 %cond) {
 ; PROLOG-BLOCK-NEXT:    call void @bar()
 ; PROLOG-BLOCK-NEXT:    br i1 %cond, label %loop_latch, label %exit1.loopexit
 ; PROLOG-BLOCK:       loop_latch:
-; PROLOG-BLOCK-NEXT:    %iv_next = add i64 %iv, 1
 ; PROLOG-BLOCK-NEXT:    call void @bar()
 ; PROLOG-BLOCK-NEXT:    br i1 %cond, label %loop_latch.1, label %exit1.loopexit
 ; PROLOG-BLOCK:       loop_latch.1:
-; PROLOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv_next, 1
+; PROLOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv, 2
 ; PROLOG-BLOCK-NEXT:    %cmp.1 = icmp ne i64 %iv_next.1, %trip
 ; PROLOG-BLOCK-NEXT:    br i1 %cmp.1, label %loop_header, label %exit2.unr-lcssa, !llvm.loop !17
 ; PROLOG-BLOCK:       exit1.loopexit:
@@ -5939,63 +5720,56 @@ define void @test12(i64 %trip, i64 %trip2, i1 %cond) {
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch:
 ; EPILOG-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.1 = icmp ne i64 %iv_next, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.1, label %loop_exiting_bb2.1, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_exiting_bb2.1:
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.1, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.1:
-; EPILOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv_next, 1
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
+; EPILOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv, 2
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.2 = icmp ne i64 %iv_next.1, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.2, label %loop_exiting_bb2.2, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_exiting_bb2.2:
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.2, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.2:
-; EPILOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv_next.1, 1
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
+; EPILOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv, 3
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.3 = icmp ne i64 %iv_next.2, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.3, label %loop_exiting_bb2.3, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_exiting_bb2.3:
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.3, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.3:
-; EPILOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv_next.2, 1
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
+; EPILOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv, 4
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.4 = icmp ne i64 %iv_next.3, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.4, label %loop_exiting_bb2.4, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_exiting_bb2.4:
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.4, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.4:
-; EPILOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv_next.3, 1
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
+; EPILOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv, 5
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.5 = icmp ne i64 %iv_next.4, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.5, label %loop_exiting_bb2.5, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_exiting_bb2.5:
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.5, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.5:
-; EPILOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv_next.4, 1
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
+; EPILOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv, 6
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.6 = icmp ne i64 %iv_next.5, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.6, label %loop_exiting_bb2.6, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_exiting_bb2.6:
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.6, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.6:
-; EPILOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv_next.5, 1
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
+; EPILOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv, 7
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.7 = icmp ne i64 %iv_next.6, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.7, label %loop_exiting_bb2.7, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_exiting_bb2.7:
 ; EPILOG-NEXT:    br i1 %cond, label %loop_latch.7, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.7:
-; EPILOG-NEXT:    %iv_next.7 = add i64 %iv_next.6, 1
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %iv_next.7 = add i64 %iv, 8
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp ne i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %loop_header, label %exit1.unr-lcssa.loopexit
 ; EPILOG:       exit1.unr-lcssa.loopexit:
@@ -6050,15 +5824,14 @@ define void @test12(i64 %trip, i64 %trip2, i1 %cond) {
 ; EPILOG-BLOCK-NEXT:    br i1 %cond, label %loop_latch, label %exit1.epilog-lcssa.loopexit
 ; EPILOG-BLOCK:       loop_latch:
 ; EPILOG-BLOCK-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    call void @bar()
 ; EPILOG-BLOCK-NEXT:    %cmp_early.1 = icmp ne i64 %iv_next, %trip2
 ; EPILOG-BLOCK-NEXT:    br i1 %cmp_early.1, label %loop_exiting_bb2.1, label %exit1.epilog-lcssa.loopexit
 ; EPILOG-BLOCK:       loop_exiting_bb2.1:
 ; EPILOG-BLOCK-NEXT:    br i1 %cond, label %loop_latch.1, label %exit1.epilog-lcssa.loopexit
 ; EPILOG-BLOCK:       loop_latch.1:
-; EPILOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv_next, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp ne i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %loop_header, label %exit1.unr-lcssa.loopexit, !llvm.loop !18
 ; EPILOG-BLOCK:       exit1.unr-lcssa.loopexit:
@@ -6132,49 +5905,49 @@ define void @test12(i64 %trip, i64 %trip2, i1 %cond) {
 ; PROLOG:       loop_exiting_bb2.1:
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.1, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.1:
-; PROLOG-NEXT:    %iv_next.1 = add i64 %iv_next, 1
+; PROLOG-NEXT:    %iv_next.1 = add i64 %iv, 2
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.2 = icmp ne i64 %iv_next.1, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.2, label %loop_exiting_bb2.2, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_exiting_bb2.2:
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.2, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.2:
-; PROLOG-NEXT:    %iv_next.2 = add i64 %iv_next.1, 1
+; PROLOG-NEXT:    %iv_next.2 = add i64 %iv, 3
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.3 = icmp ne i64 %iv_next.2, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.3, label %loop_exiting_bb2.3, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_exiting_bb2.3:
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.3, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.3:
-; PROLOG-NEXT:    %iv_next.3 = add i64 %iv_next.2, 1
+; PROLOG-NEXT:    %iv_next.3 = add i64 %iv, 4
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.4 = icmp ne i64 %iv_next.3, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.4, label %loop_exiting_bb2.4, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_exiting_bb2.4:
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.4, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.4:
-; PROLOG-NEXT:    %iv_next.4 = add i64 %iv_next.3, 1
+; PROLOG-NEXT:    %iv_next.4 = add i64 %iv, 5
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.5 = icmp ne i64 %iv_next.4, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.5, label %loop_exiting_bb2.5, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_exiting_bb2.5:
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.5, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.5:
-; PROLOG-NEXT:    %iv_next.5 = add i64 %iv_next.4, 1
+; PROLOG-NEXT:    %iv_next.5 = add i64 %iv, 6
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.6 = icmp ne i64 %iv_next.5, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.6, label %loop_exiting_bb2.6, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_exiting_bb2.6:
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.6, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.6:
-; PROLOG-NEXT:    %iv_next.6 = add i64 %iv_next.5, 1
+; PROLOG-NEXT:    %iv_next.6 = add i64 %iv, 7
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.7 = icmp ne i64 %iv_next.6, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.7, label %loop_exiting_bb2.7, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_exiting_bb2.7:
 ; PROLOG-NEXT:    br i1 %cond, label %loop_latch.7, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.7:
-; PROLOG-NEXT:    %iv_next.7 = add i64 %iv_next.6, 1
+; PROLOG-NEXT:    %iv_next.7 = add i64 %iv, 8
 ; PROLOG-NEXT:    %cmp.7 = icmp ne i64 %iv_next.7, %trip
 ; PROLOG-NEXT:    br i1 %cmp.7, label %loop_header, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       exit1.unr-lcssa.loopexit:
@@ -6224,7 +5997,7 @@ define void @test12(i64 %trip, i64 %trip2, i1 %cond) {
 ; PROLOG-BLOCK:       loop_exiting_bb2.1:
 ; PROLOG-BLOCK-NEXT:    br i1 %cond, label %loop_latch.1, label %exit1.unr-lcssa.loopexit
 ; PROLOG-BLOCK:       loop_latch.1:
-; PROLOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv_next, 1
+; PROLOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv, 2
 ; PROLOG-BLOCK-NEXT:    %cmp.1 = icmp ne i64 %iv_next.1, %trip
 ; PROLOG-BLOCK-NEXT:    br i1 %cmp.1, label %loop_header, label %exit1.unr-lcssa.loopexit, !llvm.loop !18
 ; PROLOG-BLOCK:       exit1.unr-lcssa.loopexit:
@@ -6280,7 +6053,6 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; EPILOG-NEXT:    br i1 %unknown, label %loop_latch, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch:
 ; EPILOG-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.1 = icmp ne i64 %iv_next, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.1, label %loop_exiting_bb2.1, label %exit1.epilog-lcssa.loopexit
@@ -6288,8 +6060,7 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; EPILOG-NEXT:    %unknown.1 = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown.1, label %loop_latch.1, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.1:
-; EPILOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv_next, 1
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
+; EPILOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv, 2
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.2 = icmp ne i64 %iv_next.1, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.2, label %loop_exiting_bb2.2, label %exit1.epilog-lcssa.loopexit
@@ -6297,8 +6068,7 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; EPILOG-NEXT:    %unknown.2 = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown.2, label %loop_latch.2, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.2:
-; EPILOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv_next.1, 1
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
+; EPILOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv, 3
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.3 = icmp ne i64 %iv_next.2, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.3, label %loop_exiting_bb2.3, label %exit1.epilog-lcssa.loopexit
@@ -6306,8 +6076,7 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; EPILOG-NEXT:    %unknown.3 = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown.3, label %loop_latch.3, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.3:
-; EPILOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv_next.2, 1
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
+; EPILOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv, 4
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.4 = icmp ne i64 %iv_next.3, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.4, label %loop_exiting_bb2.4, label %exit1.epilog-lcssa.loopexit
@@ -6315,8 +6084,7 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; EPILOG-NEXT:    %unknown.4 = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown.4, label %loop_latch.4, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.4:
-; EPILOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv_next.3, 1
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
+; EPILOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv, 5
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.5 = icmp ne i64 %iv_next.4, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.5, label %loop_exiting_bb2.5, label %exit1.epilog-lcssa.loopexit
@@ -6324,8 +6092,7 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; EPILOG-NEXT:    %unknown.5 = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown.5, label %loop_latch.5, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.5:
-; EPILOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv_next.4, 1
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
+; EPILOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv, 6
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.6 = icmp ne i64 %iv_next.5, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.6, label %loop_exiting_bb2.6, label %exit1.epilog-lcssa.loopexit
@@ -6333,8 +6100,7 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; EPILOG-NEXT:    %unknown.6 = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown.6, label %loop_latch.6, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.6:
-; EPILOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv_next.5, 1
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
+; EPILOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv, 7
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    %cmp_early.7 = icmp ne i64 %iv_next.6, %trip2
 ; EPILOG-NEXT:    br i1 %cmp_early.7, label %loop_exiting_bb2.7, label %exit1.epilog-lcssa.loopexit
@@ -6342,8 +6108,8 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; EPILOG-NEXT:    %unknown.7 = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown.7, label %loop_latch.7, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.7:
-; EPILOG-NEXT:    %iv_next.7 = add i64 %iv_next.6, 1
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %iv_next.7 = add i64 %iv, 8
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp ne i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %loop_header, label %exit1.unr-lcssa.loopexit
 ; EPILOG:       exit1.unr-lcssa.loopexit:
@@ -6400,7 +6166,6 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; EPILOG-BLOCK-NEXT:    br i1 %unknown, label %loop_latch, label %exit1.epilog-lcssa.loopexit
 ; EPILOG-BLOCK:       loop_latch:
 ; EPILOG-BLOCK-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    call void @bar()
 ; EPILOG-BLOCK-NEXT:    %cmp_early.1 = icmp ne i64 %iv_next, %trip2
 ; EPILOG-BLOCK-NEXT:    br i1 %cmp_early.1, label %loop_exiting_bb2.1, label %exit1.epilog-lcssa.loopexit
@@ -6408,8 +6173,8 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; EPILOG-BLOCK-NEXT:    %unknown.1 = call i1 @unknown_cond()
 ; EPILOG-BLOCK-NEXT:    br i1 %unknown.1, label %loop_latch.1, label %exit1.epilog-lcssa.loopexit
 ; EPILOG-BLOCK:       loop_latch.1:
-; EPILOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv_next, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp ne i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %loop_header, label %exit1.unr-lcssa.loopexit, !llvm.loop !19
 ; EPILOG-BLOCK:       exit1.unr-lcssa.loopexit:
@@ -6487,7 +6252,7 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; PROLOG-NEXT:    %unknown.1 = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown.1, label %loop_latch.1, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.1:
-; PROLOG-NEXT:    %iv_next.1 = add i64 %iv_next, 1
+; PROLOG-NEXT:    %iv_next.1 = add i64 %iv, 2
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.2 = icmp ne i64 %iv_next.1, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.2, label %loop_exiting_bb2.2, label %exit1.unr-lcssa.loopexit
@@ -6495,7 +6260,7 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; PROLOG-NEXT:    %unknown.2 = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown.2, label %loop_latch.2, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.2:
-; PROLOG-NEXT:    %iv_next.2 = add i64 %iv_next.1, 1
+; PROLOG-NEXT:    %iv_next.2 = add i64 %iv, 3
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.3 = icmp ne i64 %iv_next.2, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.3, label %loop_exiting_bb2.3, label %exit1.unr-lcssa.loopexit
@@ -6503,7 +6268,7 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; PROLOG-NEXT:    %unknown.3 = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown.3, label %loop_latch.3, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.3:
-; PROLOG-NEXT:    %iv_next.3 = add i64 %iv_next.2, 1
+; PROLOG-NEXT:    %iv_next.3 = add i64 %iv, 4
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.4 = icmp ne i64 %iv_next.3, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.4, label %loop_exiting_bb2.4, label %exit1.unr-lcssa.loopexit
@@ -6511,7 +6276,7 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; PROLOG-NEXT:    %unknown.4 = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown.4, label %loop_latch.4, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.4:
-; PROLOG-NEXT:    %iv_next.4 = add i64 %iv_next.3, 1
+; PROLOG-NEXT:    %iv_next.4 = add i64 %iv, 5
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.5 = icmp ne i64 %iv_next.4, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.5, label %loop_exiting_bb2.5, label %exit1.unr-lcssa.loopexit
@@ -6519,7 +6284,7 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; PROLOG-NEXT:    %unknown.5 = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown.5, label %loop_latch.5, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.5:
-; PROLOG-NEXT:    %iv_next.5 = add i64 %iv_next.4, 1
+; PROLOG-NEXT:    %iv_next.5 = add i64 %iv, 6
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.6 = icmp ne i64 %iv_next.5, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.6, label %loop_exiting_bb2.6, label %exit1.unr-lcssa.loopexit
@@ -6527,7 +6292,7 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; PROLOG-NEXT:    %unknown.6 = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown.6, label %loop_latch.6, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.6:
-; PROLOG-NEXT:    %iv_next.6 = add i64 %iv_next.5, 1
+; PROLOG-NEXT:    %iv_next.6 = add i64 %iv, 7
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    %cmp_early.7 = icmp ne i64 %iv_next.6, %trip2
 ; PROLOG-NEXT:    br i1 %cmp_early.7, label %loop_exiting_bb2.7, label %exit1.unr-lcssa.loopexit
@@ -6535,7 +6300,7 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; PROLOG-NEXT:    %unknown.7 = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown.7, label %loop_latch.7, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.7:
-; PROLOG-NEXT:    %iv_next.7 = add i64 %iv_next.6, 1
+; PROLOG-NEXT:    %iv_next.7 = add i64 %iv, 8
 ; PROLOG-NEXT:    %cmp.7 = icmp ne i64 %iv_next.7, %trip
 ; PROLOG-NEXT:    br i1 %cmp.7, label %loop_header, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       exit1.unr-lcssa.loopexit:
@@ -6588,7 +6353,7 @@ define void @test13(i64 %trip, i64 %trip2) {
 ; PROLOG-BLOCK-NEXT:    %unknown.1 = call i1 @unknown_cond()
 ; PROLOG-BLOCK-NEXT:    br i1 %unknown.1, label %loop_latch.1, label %exit1.unr-lcssa.loopexit
 ; PROLOG-BLOCK:       loop_latch.1:
-; PROLOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv_next, 1
+; PROLOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv, 2
 ; PROLOG-BLOCK-NEXT:    %cmp.1 = icmp ne i64 %iv_next.1, %trip
 ; PROLOG-BLOCK-NEXT:    br i1 %cmp.1, label %loop_header, label %exit1.unr-lcssa.loopexit, !llvm.loop !19
 ; PROLOG-BLOCK:       exit1.unr-lcssa.loopexit:
@@ -6641,64 +6406,50 @@ define void @test14(i64 %trip, i1 %cond) {
 ; EPILOG-NEXT:    %unknown = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown, label %loop_latch, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch:
-; EPILOG-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_exiting_bb2.1, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_exiting_bb2.1:
 ; EPILOG-NEXT:    %unknown.1 = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown.1, label %loop_latch.1, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.1:
-; EPILOG-NEXT:    %iv_next.1 = add nuw nsw i64 %iv_next, 1
-; EPILOG-NEXT:    %niter.next.1 = add nuw nsw i64 %niter.next, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_exiting_bb2.2, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_exiting_bb2.2:
 ; EPILOG-NEXT:    %unknown.2 = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown.2, label %loop_latch.2, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.2:
-; EPILOG-NEXT:    %iv_next.2 = add nuw nsw i64 %iv_next.1, 1
-; EPILOG-NEXT:    %niter.next.2 = add nuw nsw i64 %niter.next.1, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_exiting_bb2.3, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_exiting_bb2.3:
 ; EPILOG-NEXT:    %unknown.3 = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown.3, label %loop_latch.3, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.3:
-; EPILOG-NEXT:    %iv_next.3 = add nuw nsw i64 %iv_next.2, 1
-; EPILOG-NEXT:    %niter.next.3 = add nuw nsw i64 %niter.next.2, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_exiting_bb2.4, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_exiting_bb2.4:
 ; EPILOG-NEXT:    %unknown.4 = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown.4, label %loop_latch.4, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.4:
-; EPILOG-NEXT:    %iv_next.4 = add nuw nsw i64 %iv_next.3, 1
-; EPILOG-NEXT:    %niter.next.4 = add nuw nsw i64 %niter.next.3, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_exiting_bb2.5, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_exiting_bb2.5:
 ; EPILOG-NEXT:    %unknown.5 = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown.5, label %loop_latch.5, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.5:
-; EPILOG-NEXT:    %iv_next.5 = add nuw nsw i64 %iv_next.4, 1
-; EPILOG-NEXT:    %niter.next.5 = add nuw nsw i64 %niter.next.4, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_exiting_bb2.6, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_exiting_bb2.6:
 ; EPILOG-NEXT:    %unknown.6 = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown.6, label %loop_latch.6, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.6:
-; EPILOG-NEXT:    %iv_next.6 = add nuw nsw i64 %iv_next.5, 1
-; EPILOG-NEXT:    %niter.next.6 = add nuw nsw i64 %niter.next.5, 1
 ; EPILOG-NEXT:    call void @bar()
 ; EPILOG-NEXT:    br i1 %cond, label %loop_exiting_bb2.7, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_exiting_bb2.7:
 ; EPILOG-NEXT:    %unknown.7 = call i1 @unknown_cond()
 ; EPILOG-NEXT:    br i1 %unknown.7, label %loop_latch.7, label %exit1.epilog-lcssa.loopexit
 ; EPILOG:       loop_latch.7:
-; EPILOG-NEXT:    %iv_next.7 = add i64 %iv_next.6, 1
-; EPILOG-NEXT:    %niter.next.7 = add i64 %niter.next.6, 1
+; EPILOG-NEXT:    %iv_next.7 = add i64 %iv, 8
+; EPILOG-NEXT:    %niter.next.7 = add i64 %niter, 8
 ; EPILOG-NEXT:    %niter.ncmp.7 = icmp ne i64 %niter.next.7, %unroll_iter
 ; EPILOG-NEXT:    br i1 %niter.ncmp.7, label %loop_header, label %exit1.unr-lcssa.loopexit
 ; EPILOG:       exit1.unr-lcssa.loopexit:
@@ -6752,16 +6503,14 @@ define void @test14(i64 %trip, i1 %cond) {
 ; EPILOG-BLOCK-NEXT:    %unknown = call i1 @unknown_cond()
 ; EPILOG-BLOCK-NEXT:    br i1 %unknown, label %loop_latch, label %exit1.epilog-lcssa.loopexit
 ; EPILOG-BLOCK:       loop_latch:
-; EPILOG-BLOCK-NEXT:    %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-BLOCK-NEXT:    %niter.next = add nuw nsw i64 %niter, 1
 ; EPILOG-BLOCK-NEXT:    call void @bar()
 ; EPILOG-BLOCK-NEXT:    br i1 %cond, label %loop_exiting_bb2.1, label %exit1.epilog-lcssa.loopexit
 ; EPILOG-BLOCK:       loop_exiting_bb2.1:
 ; EPILOG-BLOCK-NEXT:    %unknown.1 = call i1 @unknown_cond()
 ; EPILOG-BLOCK-NEXT:    br i1 %unknown.1, label %loop_latch.1, label %exit1.epilog-lcssa.loopexit
 ; EPILOG-BLOCK:       loop_latch.1:
-; EPILOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv_next, 1
-; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter.next, 1
+; EPILOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv, 2
+; EPILOG-BLOCK-NEXT:    %niter.next.1 = add i64 %niter, 2
 ; EPILOG-BLOCK-NEXT:    %niter.ncmp.1 = icmp ne i64 %niter.next.1, %unroll_iter
 ; EPILOG-BLOCK-NEXT:    br i1 %niter.ncmp.1, label %loop_header, label %exit1.unr-lcssa.loopexit, !llvm.loop !20
 ; EPILOG-BLOCK:       exit1.unr-lcssa.loopexit:
@@ -6826,56 +6575,49 @@ define void @test14(i64 %trip, i1 %cond) {
 ; PROLOG-NEXT:    %unknown = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown, label %loop_latch, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch:
-; PROLOG-NEXT:    %iv_next = add i64 %iv, 1
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_exiting_bb2.1, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_exiting_bb2.1:
 ; PROLOG-NEXT:    %unknown.1 = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown.1, label %loop_latch.1, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.1:
-; PROLOG-NEXT:    %iv_next.1 = add i64 %iv_next, 1
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_exiting_bb2.2, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_exiting_bb2.2:
 ; PROLOG-NEXT:    %unknown.2 = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown.2, label %loop_latch.2, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.2:
-; PROLOG-NEXT:    %iv_next.2 = add i64 %iv_next.1, 1
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_exiting_bb2.3, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_exiting_bb2.3:
 ; PROLOG-NEXT:    %unknown.3 = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown.3, label %loop_latch.3, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.3:
-; PROLOG-NEXT:    %iv_next.3 = add i64 %iv_next.2, 1
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_exiting_bb2.4, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_exiting_bb2.4:
 ; PROLOG-NEXT:    %unknown.4 = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown.4, label %loop_latch.4, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.4:
-; PROLOG-NEXT:    %iv_next.4 = add i64 %iv_next.3, 1
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_exiting_bb2.5, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_exiting_bb2.5:
 ; PROLOG-NEXT:    %unknown.5 = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown.5, label %loop_latch.5, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.5:
-; PROLOG-NEXT:    %iv_next.5 = add i64 %iv_next.4, 1
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_exiting_bb2.6, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_exiting_bb2.6:
 ; PROLOG-NEXT:    %unknown.6 = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown.6, label %loop_latch.6, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.6:
-; PROLOG-NEXT:    %iv_next.6 = add i64 %iv_next.5, 1
 ; PROLOG-NEXT:    call void @bar()
 ; PROLOG-NEXT:    br i1 %cond, label %loop_exiting_bb2.7, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_exiting_bb2.7:
 ; PROLOG-NEXT:    %unknown.7 = call i1 @unknown_cond()
 ; PROLOG-NEXT:    br i1 %unknown.7, label %loop_latch.7, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       loop_latch.7:
-; PROLOG-NEXT:    %iv_next.7 = add i64 %iv_next.6, 1
+; PROLOG-NEXT:    %iv_next.7 = add i64 %iv, 8
 ; PROLOG-NEXT:    %cmp.7 = icmp ne i64 %iv_next.7, %trip
 ; PROLOG-NEXT:    br i1 %cmp.7, label %loop_header, label %exit1.unr-lcssa.loopexit
 ; PROLOG:       exit1.unr-lcssa.loopexit:
@@ -6918,14 +6660,13 @@ define void @test14(i64 %trip, i1 %cond) {
 ; PROLOG-BLOCK-NEXT:    %unknown = call i1 @unknown_cond()
 ; PROLOG-BLOCK-NEXT:    br i1 %unknown, label %loop_latch, label %exit1.unr-lcssa.loopexit
 ; PROLOG-BLOCK:       loop_latch:
-; PROLOG-BLOCK-NEXT:    %iv_next = add i64 %iv, 1
 ; PROLOG-BLOCK-NEXT:    call void @bar()
 ; PROLOG-BLOCK-NEXT:    br i1 %cond, label %loop_exiting_bb2.1, label %exit1.unr-lcssa.loopexit
 ; PROLOG-BLOCK:       loop_exiting_bb2.1:
 ; PROLOG-BLOCK-NEXT:    %unknown.1 = call i1 @unknown_cond()
 ; PROLOG-BLOCK-NEXT:    br i1 %unknown.1, label %loop_latch.1, label %exit1.unr-lcssa.loopexit
 ; PROLOG-BLOCK:       loop_latch.1:
-; PROLOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv_next, 1
+; PROLOG-BLOCK-NEXT:    %iv_next.1 = add i64 %iv, 2
 ; PROLOG-BLOCK-NEXT:    %cmp.1 = icmp ne i64 %iv_next.1, %trip
 ; PROLOG-BLOCK-NEXT:    br i1 %cmp.1, label %loop_header, label %exit1.unr-lcssa.loopexit, !llvm.loop !20
 ; PROLOG-BLOCK:       exit1.unr-lcssa.loopexit:

diff  --git a/llvm/test/Transforms/LoopUnroll/runtime-loop5.ll b/llvm/test/Transforms/LoopUnroll/runtime-loop5.ll
index 2a66ccc2fa593a..b44206a044c291 100644
--- a/llvm/test/Transforms/LoopUnroll/runtime-loop5.ll
+++ b/llvm/test/Transforms/LoopUnroll/runtime-loop5.ll
@@ -81,22 +81,19 @@ define i3 @test(ptr %a, i3 %n) {
 ; UNROLL-4-NEXT:    [[TMP2:%.*]] = load i3, ptr [[ARRAYIDX]], align 1
 ; UNROLL-4-NEXT:    [[ADD:%.*]] = add nsw i3 [[TMP2]], [[SUM_02]]
 ; UNROLL-4-NEXT:    [[INDVARS_IV_NEXT:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; UNROLL-4-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i3 [[NITER]], 1
 ; UNROLL-4-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr inbounds i3, ptr [[A]], i64 [[INDVARS_IV_NEXT]]
 ; UNROLL-4-NEXT:    [[TMP3:%.*]] = load i3, ptr [[ARRAYIDX_1]], align 1
 ; UNROLL-4-NEXT:    [[ADD_1:%.*]] = add nsw i3 [[TMP3]], [[ADD]]
-; UNROLL-4-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT]], 1
-; UNROLL-4-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i3 [[NITER_NEXT]], 1
+; UNROLL-4-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 2
 ; UNROLL-4-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr inbounds i3, ptr [[A]], i64 [[INDVARS_IV_NEXT_1]]
 ; UNROLL-4-NEXT:    [[TMP4:%.*]] = load i3, ptr [[ARRAYIDX_2]], align 1
 ; UNROLL-4-NEXT:    [[ADD_2:%.*]] = add nsw i3 [[TMP4]], [[ADD_1]]
-; UNROLL-4-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_1]], 1
-; UNROLL-4-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i3 [[NITER_NEXT_1]], 1
+; UNROLL-4-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 3
 ; UNROLL-4-NEXT:    [[ARRAYIDX_3:%.*]] = getelementptr inbounds i3, ptr [[A]], i64 [[INDVARS_IV_NEXT_2]]
 ; UNROLL-4-NEXT:    [[TMP5:%.*]] = load i3, ptr [[ARRAYIDX_3]], align 1
 ; UNROLL-4-NEXT:    [[ADD_3]] = add nsw i3 [[TMP5]], [[ADD_2]]
-; UNROLL-4-NEXT:    [[INDVARS_IV_NEXT_3]] = add nuw nsw i64 [[INDVARS_IV_NEXT_2]], 1
-; UNROLL-4-NEXT:    [[NITER_NEXT_3]] = add i3 [[NITER_NEXT_2]], 1
+; UNROLL-4-NEXT:    [[INDVARS_IV_NEXT_3]] = add nuw nsw i64 [[INDVARS_IV]], 4
+; UNROLL-4-NEXT:    [[NITER_NEXT_3]] = add i3 [[NITER]], -4
 ; UNROLL-4-NEXT:    [[NITER_NCMP_3:%.*]] = icmp eq i3 [[NITER_NEXT_3]], [[UNROLL_ITER]]
 ; UNROLL-4-NEXT:    br i1 [[NITER_NCMP_3]], label [[FOR_END_LOOPEXIT_UNR_LCSSA_LOOPEXIT:%.*]], label [[FOR_BODY]], !llvm.loop [[LOOP0:![0-9]+]]
 ; UNROLL-4:       for.end.loopexit.unr-lcssa.loopexit:

diff  --git a/llvm/test/Transforms/LoopUnroll/runtime-multiexit-heuristic.ll b/llvm/test/Transforms/LoopUnroll/runtime-multiexit-heuristic.ll
index fbd4148b8e2bcf..db2136b1b69b31 100644
--- a/llvm/test/Transforms/LoopUnroll/runtime-multiexit-heuristic.ll
+++ b/llvm/test/Transforms/LoopUnroll/runtime-multiexit-heuristic.ll
@@ -191,7 +191,6 @@ define i32 @test1(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[TMP3:%.*]] = load i32, ptr [[ARRAYIDX]], align 4
 ; ENABLED-NEXT:    [[ADD:%.*]] = add nsw i32 [[TMP3]], [[SUM_02]]
 ; ENABLED-NEXT:    [[INDVARS_IV_NEXT:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; ENABLED-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i64 [[NITER]], 1
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_1:%.*]]
 ; ENABLED:       for.exiting_block.1:
 ; ENABLED-NEXT:    [[CMP_1:%.*]] = icmp eq i64 [[N]], 42
@@ -200,8 +199,7 @@ define i32 @test1(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT]]
 ; ENABLED-NEXT:    [[TMP4:%.*]] = load i32, ptr [[ARRAYIDX_1]], align 4
 ; ENABLED-NEXT:    [[ADD_1:%.*]] = add nsw i32 [[TMP4]], [[ADD]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i64 [[NITER_NEXT]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 2
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_2:%.*]]
 ; ENABLED:       for.exiting_block.2:
 ; ENABLED-NEXT:    [[CMP_2:%.*]] = icmp eq i64 [[N]], 42
@@ -210,8 +208,7 @@ define i32 @test1(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_1]]
 ; ENABLED-NEXT:    [[TMP5:%.*]] = load i32, ptr [[ARRAYIDX_2]], align 4
 ; ENABLED-NEXT:    [[ADD_2:%.*]] = add nsw i32 [[TMP5]], [[ADD_1]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_1]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i64 [[NITER_NEXT_1]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 3
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_3:%.*]]
 ; ENABLED:       for.exiting_block.3:
 ; ENABLED-NEXT:    [[CMP_3:%.*]] = icmp eq i64 [[N]], 42
@@ -220,8 +217,7 @@ define i32 @test1(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_2]]
 ; ENABLED-NEXT:    [[TMP6:%.*]] = load i32, ptr [[ARRAYIDX_3]], align 4
 ; ENABLED-NEXT:    [[ADD_3:%.*]] = add nsw i32 [[TMP6]], [[ADD_2]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_2]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_3:%.*]] = add nuw nsw i64 [[NITER_NEXT_2]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 4
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_4:%.*]]
 ; ENABLED:       for.exiting_block.4:
 ; ENABLED-NEXT:    [[CMP_4:%.*]] = icmp eq i64 [[N]], 42
@@ -230,8 +226,7 @@ define i32 @test1(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_4:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_3]]
 ; ENABLED-NEXT:    [[TMP7:%.*]] = load i32, ptr [[ARRAYIDX_4]], align 4
 ; ENABLED-NEXT:    [[ADD_4:%.*]] = add nsw i32 [[TMP7]], [[ADD_3]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_3]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_4:%.*]] = add nuw nsw i64 [[NITER_NEXT_3]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 5
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_5:%.*]]
 ; ENABLED:       for.exiting_block.5:
 ; ENABLED-NEXT:    [[CMP_5:%.*]] = icmp eq i64 [[N]], 42
@@ -240,8 +235,7 @@ define i32 @test1(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_5:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_4]]
 ; ENABLED-NEXT:    [[TMP8:%.*]] = load i32, ptr [[ARRAYIDX_5]], align 4
 ; ENABLED-NEXT:    [[ADD_5:%.*]] = add nsw i32 [[TMP8]], [[ADD_4]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_4]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_5:%.*]] = add nuw nsw i64 [[NITER_NEXT_4]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 6
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_6:%.*]]
 ; ENABLED:       for.exiting_block.6:
 ; ENABLED-NEXT:    [[CMP_6:%.*]] = icmp eq i64 [[N]], 42
@@ -250,8 +244,7 @@ define i32 @test1(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_6:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_5]]
 ; ENABLED-NEXT:    [[TMP9:%.*]] = load i32, ptr [[ARRAYIDX_6]], align 4
 ; ENABLED-NEXT:    [[ADD_6:%.*]] = add nsw i32 [[TMP9]], [[ADD_5]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_5]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_6:%.*]] = add nuw nsw i64 [[NITER_NEXT_5]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 7
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_7:%.*]]
 ; ENABLED:       for.exiting_block.7:
 ; ENABLED-NEXT:    [[CMP_7:%.*]] = icmp eq i64 [[N]], 42
@@ -260,8 +253,8 @@ define i32 @test1(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_7:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_6]]
 ; ENABLED-NEXT:    [[TMP10:%.*]] = load i32, ptr [[ARRAYIDX_7]], align 4
 ; ENABLED-NEXT:    [[ADD_7]] = add nsw i32 [[TMP10]], [[ADD_6]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_7]] = add i64 [[INDVARS_IV_NEXT_6]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_7]] = add i64 [[NITER_NEXT_6]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_7]] = add i64 [[INDVARS_IV]], 8
+; ENABLED-NEXT:    [[NITER_NEXT_7]] = add i64 [[NITER]], 8
 ; ENABLED-NEXT:    [[NITER_NCMP_7:%.*]] = icmp eq i64 [[NITER_NEXT_7]], [[UNROLL_ITER]]
 ; ENABLED-NEXT:    br i1 [[NITER_NCMP_7]], label [[LATCHEXIT_UNR_LCSSA_LOOPEXIT:%.*]], label [[HEADER]]
 ; ENABLED:       latchexit.unr-lcssa.loopexit:
@@ -412,7 +405,6 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[TMP3:%.*]] = load i32, ptr [[ARRAYIDX]], align 4
 ; ENABLED-NEXT:    [[ADD:%.*]] = add nsw i32 [[TMP3]], [[SUM_02]]
 ; ENABLED-NEXT:    [[INDVARS_IV_NEXT:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; ENABLED-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i64 [[NITER]], 1
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_1:%.*]]
 ; ENABLED:       for.exiting_block.1:
 ; ENABLED-NEXT:    [[CMP_1:%.*]] = icmp eq i64 [[N]], 42
@@ -421,8 +413,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT]]
 ; ENABLED-NEXT:    [[TMP4:%.*]] = load i32, ptr [[ARRAYIDX_1]], align 4
 ; ENABLED-NEXT:    [[ADD_1:%.*]] = add nsw i32 [[TMP4]], [[ADD]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i64 [[NITER_NEXT]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 2
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_2:%.*]]
 ; ENABLED:       for.exiting_block.2:
 ; ENABLED-NEXT:    [[CMP_2:%.*]] = icmp eq i64 [[N]], 42
@@ -431,8 +422,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_1]]
 ; ENABLED-NEXT:    [[TMP5:%.*]] = load i32, ptr [[ARRAYIDX_2]], align 4
 ; ENABLED-NEXT:    [[ADD_2:%.*]] = add nsw i32 [[TMP5]], [[ADD_1]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_1]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i64 [[NITER_NEXT_1]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 3
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_3:%.*]]
 ; ENABLED:       for.exiting_block.3:
 ; ENABLED-NEXT:    [[CMP_3:%.*]] = icmp eq i64 [[N]], 42
@@ -441,8 +431,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_2]]
 ; ENABLED-NEXT:    [[TMP6:%.*]] = load i32, ptr [[ARRAYIDX_3]], align 4
 ; ENABLED-NEXT:    [[ADD_3:%.*]] = add nsw i32 [[TMP6]], [[ADD_2]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_2]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_3:%.*]] = add nuw nsw i64 [[NITER_NEXT_2]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 4
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_4:%.*]]
 ; ENABLED:       for.exiting_block.4:
 ; ENABLED-NEXT:    [[CMP_4:%.*]] = icmp eq i64 [[N]], 42
@@ -451,8 +440,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_4:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_3]]
 ; ENABLED-NEXT:    [[TMP7:%.*]] = load i32, ptr [[ARRAYIDX_4]], align 4
 ; ENABLED-NEXT:    [[ADD_4:%.*]] = add nsw i32 [[TMP7]], [[ADD_3]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_3]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_4:%.*]] = add nuw nsw i64 [[NITER_NEXT_3]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 5
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_5:%.*]]
 ; ENABLED:       for.exiting_block.5:
 ; ENABLED-NEXT:    [[CMP_5:%.*]] = icmp eq i64 [[N]], 42
@@ -461,8 +449,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_5:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_4]]
 ; ENABLED-NEXT:    [[TMP8:%.*]] = load i32, ptr [[ARRAYIDX_5]], align 4
 ; ENABLED-NEXT:    [[ADD_5:%.*]] = add nsw i32 [[TMP8]], [[ADD_4]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_4]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_5:%.*]] = add nuw nsw i64 [[NITER_NEXT_4]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 6
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_6:%.*]]
 ; ENABLED:       for.exiting_block.6:
 ; ENABLED-NEXT:    [[CMP_6:%.*]] = icmp eq i64 [[N]], 42
@@ -471,8 +458,7 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_6:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_5]]
 ; ENABLED-NEXT:    [[TMP9:%.*]] = load i32, ptr [[ARRAYIDX_6]], align 4
 ; ENABLED-NEXT:    [[ADD_6:%.*]] = add nsw i32 [[TMP9]], [[ADD_5]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_5]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_6:%.*]] = add nuw nsw i64 [[NITER_NEXT_5]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 7
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_7:%.*]]
 ; ENABLED:       for.exiting_block.7:
 ; ENABLED-NEXT:    [[CMP_7:%.*]] = icmp eq i64 [[N]], 42
@@ -481,8 +467,8 @@ define i32 @test2(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_7:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_6]]
 ; ENABLED-NEXT:    [[TMP10:%.*]] = load i32, ptr [[ARRAYIDX_7]], align 4
 ; ENABLED-NEXT:    [[ADD_7]] = add nsw i32 [[TMP10]], [[ADD_6]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_7]] = add i64 [[INDVARS_IV_NEXT_6]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_7]] = add i64 [[NITER_NEXT_6]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_7]] = add i64 [[INDVARS_IV]], 8
+; ENABLED-NEXT:    [[NITER_NEXT_7]] = add i64 [[NITER]], 8
 ; ENABLED-NEXT:    [[NITER_NCMP_7:%.*]] = icmp eq i64 [[NITER_NEXT_7]], [[UNROLL_ITER]]
 ; ENABLED-NEXT:    br i1 [[NITER_NCMP_7]], label [[LATCHEXIT_UNR_LCSSA_LOOPEXIT:%.*]], label [[HEADER]]
 ; ENABLED:       latchexit.unr-lcssa.loopexit:
@@ -946,7 +932,6 @@ define i32 @test5(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[TMP3:%.*]] = load i32, ptr [[ARRAYIDX]], align 4
 ; ENABLED-NEXT:    [[ADD:%.*]] = add nsw i32 [[TMP3]], [[SUM_02]]
 ; ENABLED-NEXT:    [[INDVARS_IV_NEXT:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; ENABLED-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i64 [[NITER]], 1
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_1:%.*]]
 ; ENABLED:       for.exiting_block.1:
 ; ENABLED-NEXT:    [[CMP_1:%.*]] = icmp eq i64 [[N]], 42
@@ -955,8 +940,7 @@ define i32 @test5(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT]]
 ; ENABLED-NEXT:    [[TMP4:%.*]] = load i32, ptr [[ARRAYIDX_1]], align 4
 ; ENABLED-NEXT:    [[ADD_1:%.*]] = add nsw i32 [[TMP4]], [[ADD]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i64 [[NITER_NEXT]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_1:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 2
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_2:%.*]]
 ; ENABLED:       for.exiting_block.2:
 ; ENABLED-NEXT:    [[CMP_2:%.*]] = icmp eq i64 [[N]], 42
@@ -965,8 +949,7 @@ define i32 @test5(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_1]]
 ; ENABLED-NEXT:    [[TMP5:%.*]] = load i32, ptr [[ARRAYIDX_2]], align 4
 ; ENABLED-NEXT:    [[ADD_2:%.*]] = add nsw i32 [[TMP5]], [[ADD_1]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_1]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i64 [[NITER_NEXT_1]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_2:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 3
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_3:%.*]]
 ; ENABLED:       for.exiting_block.3:
 ; ENABLED-NEXT:    [[CMP_3:%.*]] = icmp eq i64 [[N]], 42
@@ -975,8 +958,7 @@ define i32 @test5(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_2]]
 ; ENABLED-NEXT:    [[TMP6:%.*]] = load i32, ptr [[ARRAYIDX_3]], align 4
 ; ENABLED-NEXT:    [[ADD_3:%.*]] = add nsw i32 [[TMP6]], [[ADD_2]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_2]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_3:%.*]] = add nuw nsw i64 [[NITER_NEXT_2]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_3:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 4
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_4:%.*]]
 ; ENABLED:       for.exiting_block.4:
 ; ENABLED-NEXT:    [[CMP_4:%.*]] = icmp eq i64 [[N]], 42
@@ -985,8 +967,7 @@ define i32 @test5(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_4:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_3]]
 ; ENABLED-NEXT:    [[TMP7:%.*]] = load i32, ptr [[ARRAYIDX_4]], align 4
 ; ENABLED-NEXT:    [[ADD_4:%.*]] = add nsw i32 [[TMP7]], [[ADD_3]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_3]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_4:%.*]] = add nuw nsw i64 [[NITER_NEXT_3]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_4:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 5
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_5:%.*]]
 ; ENABLED:       for.exiting_block.5:
 ; ENABLED-NEXT:    [[CMP_5:%.*]] = icmp eq i64 [[N]], 42
@@ -995,8 +976,7 @@ define i32 @test5(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_5:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_4]]
 ; ENABLED-NEXT:    [[TMP8:%.*]] = load i32, ptr [[ARRAYIDX_5]], align 4
 ; ENABLED-NEXT:    [[ADD_5:%.*]] = add nsw i32 [[TMP8]], [[ADD_4]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_4]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_5:%.*]] = add nuw nsw i64 [[NITER_NEXT_4]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_5:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 6
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_6:%.*]]
 ; ENABLED:       for.exiting_block.6:
 ; ENABLED-NEXT:    [[CMP_6:%.*]] = icmp eq i64 [[N]], 42
@@ -1005,8 +985,7 @@ define i32 @test5(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_6:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_5]]
 ; ENABLED-NEXT:    [[TMP9:%.*]] = load i32, ptr [[ARRAYIDX_6]], align 4
 ; ENABLED-NEXT:    [[ADD_6:%.*]] = add nsw i32 [[TMP9]], [[ADD_5]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INDVARS_IV_NEXT_5]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_6:%.*]] = add nuw nsw i64 [[NITER_NEXT_5]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_6:%.*]] = add nuw nsw i64 [[INDVARS_IV]], 7
 ; ENABLED-NEXT:    br label [[FOR_EXITING_BLOCK_7:%.*]]
 ; ENABLED:       for.exiting_block.7:
 ; ENABLED-NEXT:    [[CMP_7:%.*]] = icmp eq i64 [[N]], 42
@@ -1015,8 +994,8 @@ define i32 @test5(ptr nocapture %a, i64 %n) {
 ; ENABLED-NEXT:    [[ARRAYIDX_7:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDVARS_IV_NEXT_6]]
 ; ENABLED-NEXT:    [[TMP10:%.*]] = load i32, ptr [[ARRAYIDX_7]], align 4
 ; ENABLED-NEXT:    [[ADD_7]] = add nsw i32 [[TMP10]], [[ADD_6]]
-; ENABLED-NEXT:    [[INDVARS_IV_NEXT_7]] = add i64 [[INDVARS_IV_NEXT_6]], 1
-; ENABLED-NEXT:    [[NITER_NEXT_7]] = add i64 [[NITER_NEXT_6]], 1
+; ENABLED-NEXT:    [[INDVARS_IV_NEXT_7]] = add i64 [[INDVARS_IV]], 8
+; ENABLED-NEXT:    [[NITER_NEXT_7]] = add i64 [[NITER]], 8
 ; ENABLED-NEXT:    [[NITER_NCMP_7:%.*]] = icmp eq i64 [[NITER_NEXT_7]], [[UNROLL_ITER]]
 ; ENABLED-NEXT:    br i1 [[NITER_NCMP_7]], label [[LATCHEXIT_UNR_LCSSA_LOOPEXIT:%.*]], label [[HEADER]]
 ; ENABLED:       latchexit.unr-lcssa.loopexit:

diff  --git a/llvm/test/Transforms/LoopUnroll/runtime-small-upperbound.ll b/llvm/test/Transforms/LoopUnroll/runtime-small-upperbound.ll
index 2d2a79c6a5ceae..247cdd6c6be286 100644
--- a/llvm/test/Transforms/LoopUnroll/runtime-small-upperbound.ll
+++ b/llvm/test/Transforms/LoopUnroll/runtime-small-upperbound.ll
@@ -108,29 +108,27 @@ define dso_local void @hoge_5(i8 %arg) {
 ; UPPER-NEXT:    [[TMP1:%.*]] = icmp ult i32 [[IV_NEXT]], 17
 ; UPPER-NEXT:    br i1 [[TMP1]], label [[LOOP_1:%.*]], label [[EXIT_LOOPEXIT:%.*]]
 ; UPPER:       loop.1:
-; UPPER-NEXT:    [[IV_NEXT_1:%.*]] = add nuw i32 [[IV_NEXT]], 4
+; UPPER-NEXT:    [[IV_NEXT_1:%.*]] = add nuw i32 [[X]], 8
 ; UPPER-NEXT:    [[PTR_NEXT_1:%.*]] = getelementptr inbounds i8, ptr [[PTR_NEXT]], i32 1
 ; UPPER-NEXT:    store i8 [[ARG]], ptr [[PTR_NEXT_1]], align 1
 ; UPPER-NEXT:    [[TMP2:%.*]] = icmp ult i32 [[IV_NEXT_1]], 17
 ; UPPER-NEXT:    br i1 [[TMP2]], label [[LOOP_2:%.*]], label [[EXIT_LOOPEXIT]]
 ; UPPER:       loop.2:
-; UPPER-NEXT:    [[IV_NEXT_2:%.*]] = add nuw i32 [[IV_NEXT_1]], 4
+; UPPER-NEXT:    [[IV_NEXT_2:%.*]] = add nuw i32 [[X]], 12
 ; UPPER-NEXT:    [[PTR_NEXT_2:%.*]] = getelementptr inbounds i8, ptr [[PTR_NEXT_1]], i32 1
 ; UPPER-NEXT:    store i8 [[ARG]], ptr [[PTR_NEXT_2]], align 1
 ; UPPER-NEXT:    [[TMP3:%.*]] = icmp ult i32 [[IV_NEXT_2]], 17
 ; UPPER-NEXT:    br i1 [[TMP3]], label [[LOOP_3:%.*]], label [[EXIT_LOOPEXIT]]
 ; UPPER:       loop.3:
-; UPPER-NEXT:    [[IV_NEXT_3:%.*]] = add nuw i32 [[IV_NEXT_2]], 4
+; UPPER-NEXT:    [[IV_NEXT_3:%.*]] = add nuw i32 [[X]], 16
 ; UPPER-NEXT:    [[PTR_NEXT_3:%.*]] = getelementptr inbounds i8, ptr [[PTR_NEXT_2]], i32 1
 ; UPPER-NEXT:    store i8 [[ARG]], ptr [[PTR_NEXT_3]], align 1
 ; UPPER-NEXT:    [[TMP4:%.*]] = icmp ult i32 [[IV_NEXT_3]], 17
 ; UPPER-NEXT:    br i1 [[TMP4]], label [[LOOP_4:%.*]], label [[EXIT_LOOPEXIT]]
 ; UPPER:       loop.4:
-; UPPER-NEXT:    [[IV_NEXT_4:%.*]] = add nuw i32 [[IV_NEXT_3]], 4
 ; UPPER-NEXT:    [[PTR_NEXT_4:%.*]] = getelementptr inbounds i8, ptr [[PTR_NEXT_3]], i32 1
 ; UPPER-NEXT:    store i8 [[ARG]], ptr [[PTR_NEXT_4]], align 1
-; UPPER-NEXT:    [[TMP5:%.*]] = icmp ult i32 [[IV_NEXT_4]], 17
-; UPPER-NEXT:    br i1 [[TMP5]], label [[LOOP_5:%.*]], label [[EXIT_LOOPEXIT]]
+; UPPER-NEXT:    br i1 false, label [[LOOP_5:%.*]], label [[EXIT_LOOPEXIT]]
 ; UPPER:       loop.5:
 ; UPPER-NEXT:    [[PTR_NEXT_5:%.*]] = getelementptr inbounds i8, ptr [[PTR_NEXT_4]], i32 1
 ; UPPER-NEXT:    store i8 [[ARG]], ptr [[PTR_NEXT_5]], align 1

diff  --git a/llvm/test/Transforms/LoopUnroll/runtime-unroll-assume-no-remainder.ll b/llvm/test/Transforms/LoopUnroll/runtime-unroll-assume-no-remainder.ll
index 6dc0d1c8c4f16a..81fceb61a24505 100644
--- a/llvm/test/Transforms/LoopUnroll/runtime-unroll-assume-no-remainder.ll
+++ b/llvm/test/Transforms/LoopUnroll/runtime-unroll-assume-no-remainder.ll
@@ -33,7 +33,7 @@ define dso_local void @assumeDivisibleTC(ptr noalias nocapture %a, ptr noalias n
 ; CHECK-NEXT:    [[ADD_1:%.*]] = add i8 [[TMP1]], 3
 ; CHECK-NEXT:    [[ARRAYIDX4_1:%.*]] = getelementptr inbounds i8, ptr [[A]], i32 [[INC]]
 ; CHECK-NEXT:    store i8 [[ADD_1]], ptr [[ARRAYIDX4_1]], align 1
-; CHECK-NEXT:    [[INC_1]] = add nuw nsw i32 [[INC]], 1
+; CHECK-NEXT:    [[INC_1]] = add nuw nsw i32 [[I_011]], 2
 ; CHECK-NEXT:    [[CMP1_1:%.*]] = icmp slt i32 [[INC_1]], [[N]]
 ; CHECK-NEXT:    br i1 [[CMP1_1]], label [[FOR_BODY]], label [[EXIT_LOOPEXIT:%.*]], !llvm.loop [[LOOP0:![0-9]+]]
 ; CHECK:       exit.loopexit:
@@ -104,14 +104,13 @@ define dso_local void @cannotProveDivisibleTC(ptr noalias nocapture %a, ptr noal
 ; CHECK-NEXT:    [[ARRAYIDX4:%.*]] = getelementptr inbounds i8, ptr [[A:%.*]], i32 [[I_011]]
 ; CHECK-NEXT:    store i8 [[ADD]], ptr [[ARRAYIDX4]], align 1
 ; CHECK-NEXT:    [[INC:%.*]] = add nuw nsw i32 [[I_011]], 1
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i32 [[NITER]], 1
 ; CHECK-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr inbounds i8, ptr [[B]], i32 [[INC]]
 ; CHECK-NEXT:    [[TMP3:%.*]] = load i8, ptr [[ARRAYIDX_1]], align 1
 ; CHECK-NEXT:    [[ADD_1:%.*]] = add i8 [[TMP3]], 3
 ; CHECK-NEXT:    [[ARRAYIDX4_1:%.*]] = getelementptr inbounds i8, ptr [[A]], i32 [[INC]]
 ; CHECK-NEXT:    store i8 [[ADD_1]], ptr [[ARRAYIDX4_1]], align 1
-; CHECK-NEXT:    [[INC_1]] = add nuw nsw i32 [[INC]], 1
-; CHECK-NEXT:    [[NITER_NEXT_1]] = add i32 [[NITER_NEXT]], 1
+; CHECK-NEXT:    [[INC_1]] = add nuw nsw i32 [[I_011]], 2
+; CHECK-NEXT:    [[NITER_NEXT_1]] = add i32 [[NITER]], 2
 ; CHECK-NEXT:    [[NITER_NCMP_1:%.*]] = icmp ne i32 [[NITER_NEXT_1]], [[UNROLL_ITER]]
 ; CHECK-NEXT:    br i1 [[NITER_NCMP_1]], label [[FOR_BODY]], label [[EXIT_LOOPEXIT_UNR_LCSSA_LOOPEXIT:%.*]], !llvm.loop [[LOOP2:![0-9]+]]
 ; CHECK:       exit.loopexit.unr-lcssa.loopexit:

diff  --git a/llvm/test/Transforms/LoopUnroll/scev-invalidation-lcssa.ll b/llvm/test/Transforms/LoopUnroll/scev-invalidation-lcssa.ll
index c8cb54ae127ed4..ec71c67d250b41 100644
--- a/llvm/test/Transforms/LoopUnroll/scev-invalidation-lcssa.ll
+++ b/llvm/test/Transforms/LoopUnroll/scev-invalidation-lcssa.ll
@@ -37,22 +37,8 @@ define i32 @f(i1 %cond1) #0 !prof !0 {
 ; CHECK:       loop2:
 ; CHECK-NEXT:    [[PHI:%.*]] = phi i64 [ 0, [[ENTRY2_NEW]] ], [ [[INC_7:%.*]], [[LOOP2]] ]
 ; CHECK-NEXT:    [[NITER:%.*]] = phi i64 [ 0, [[ENTRY2_NEW]] ], [ [[NITER_NEXT_7:%.*]], [[LOOP2]] ]
-; CHECK-NEXT:    [[INC:%.*]] = add nuw nsw i64 [[PHI]], 1
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i64 [[NITER]], 1
-; CHECK-NEXT:    [[INC_1:%.*]] = add nuw nsw i64 [[INC]], 1
-; CHECK-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i64 [[NITER_NEXT]], 1
-; CHECK-NEXT:    [[INC_2:%.*]] = add nuw nsw i64 [[INC_1]], 1
-; CHECK-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i64 [[NITER_NEXT_1]], 1
-; CHECK-NEXT:    [[INC_3:%.*]] = add nuw nsw i64 [[INC_2]], 1
-; CHECK-NEXT:    [[NITER_NEXT_3:%.*]] = add nuw nsw i64 [[NITER_NEXT_2]], 1
-; CHECK-NEXT:    [[INC_4:%.*]] = add nuw nsw i64 [[INC_3]], 1
-; CHECK-NEXT:    [[NITER_NEXT_4:%.*]] = add nuw nsw i64 [[NITER_NEXT_3]], 1
-; CHECK-NEXT:    [[INC_5:%.*]] = add nuw nsw i64 [[INC_4]], 1
-; CHECK-NEXT:    [[NITER_NEXT_5:%.*]] = add nuw nsw i64 [[NITER_NEXT_4]], 1
-; CHECK-NEXT:    [[INC_6:%.*]] = add nuw nsw i64 [[INC_5]], 1
-; CHECK-NEXT:    [[NITER_NEXT_6:%.*]] = add nuw nsw i64 [[NITER_NEXT_5]], 1
-; CHECK-NEXT:    [[INC_7]] = add i64 [[INC_6]], 1
-; CHECK-NEXT:    [[NITER_NEXT_7]] = add i64 [[NITER_NEXT_6]], 1
+; CHECK-NEXT:    [[INC_7]] = add i64 [[PHI]], 8
+; CHECK-NEXT:    [[NITER_NEXT_7]] = add i64 [[NITER]], 8
 ; CHECK-NEXT:    [[NITER_NCMP_7:%.*]] = icmp eq i64 [[NITER_NEXT_7]], [[UNROLL_ITER]]
 ; CHECK-NEXT:    br i1 [[NITER_NCMP_7]], label [[EXIT2_UNR_LCSSA_LOOPEXIT:%.*]], label [[LOOP2]]
 ; CHECK:       exit2.unr-lcssa.loopexit:

diff  --git a/llvm/test/Transforms/LoopUnroll/shifted-tripcount.ll b/llvm/test/Transforms/LoopUnroll/shifted-tripcount.ll
index 62dc3d611bef8c..01ac4b77f2e452 100644
--- a/llvm/test/Transforms/LoopUnroll/shifted-tripcount.ll
+++ b/llvm/test/Transforms/LoopUnroll/shifted-tripcount.ll
@@ -17,7 +17,7 @@ define void @latch_exit(ptr nocapture %p, i64 %n) nounwind {
 ; CHECK-NEXT:    [[MUL9:%.*]] = fmul double [[TMP8]], [[TMP4]]
 ; CHECK-NEXT:    store double [[MUL9]], ptr [[ARRAYIDX7]], align 8
 ; CHECK-NEXT:    [[ARRAYIDX7_1:%.*]] = getelementptr double, ptr [[P]], i64 [[TMP16]]
-; CHECK-NEXT:    [[TMP16_1]] = add i64 [[TMP16]], 1
+; CHECK-NEXT:    [[TMP16_1]] = add i64 [[I_013]], 2
 ; CHECK-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr double, ptr [[P]], i64 [[TMP16_1]]
 ; CHECK-NEXT:    [[TMP4_1:%.*]] = load double, ptr [[ARRAYIDX_1]], align 8
 ; CHECK-NEXT:    [[TMP8_1:%.*]] = load double, ptr [[ARRAYIDX7_1]], align 8
@@ -67,7 +67,7 @@ define void @non_latch_exit(ptr nocapture %p, i64 %n) nounwind {
 ; CHECK-NEXT:    br label [[LATCH:%.*]]
 ; CHECK:       latch:
 ; CHECK-NEXT:    [[ARRAYIDX7_1:%.*]] = getelementptr double, ptr [[P]], i64 [[TMP16]]
-; CHECK-NEXT:    [[TMP16_1]] = add i64 [[TMP16]], 1
+; CHECK-NEXT:    [[TMP16_1]] = add i64 [[I_013]], 2
 ; CHECK-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr double, ptr [[P]], i64 [[TMP16_1]]
 ; CHECK-NEXT:    [[TMP4_1:%.*]] = load double, ptr [[ARRAYIDX_1]], align 8
 ; CHECK-NEXT:    [[TMP8_1:%.*]] = load double, ptr [[ARRAYIDX7_1]], align 8

diff  --git a/llvm/test/Transforms/LoopUnroll/tripcount-overflow.ll b/llvm/test/Transforms/LoopUnroll/tripcount-overflow.ll
index 284fcb19e6b714..0e4c73e5e55345 100644
--- a/llvm/test/Transforms/LoopUnroll/tripcount-overflow.ll
+++ b/llvm/test/Transforms/LoopUnroll/tripcount-overflow.ll
@@ -25,9 +25,8 @@ define i32 @foo(i32 %N) {
 ; EPILOG-NEXT:    [[I:%.*]] = phi i32 [ 0, [[ENTRY_NEW]] ], [ [[INC_1:%.*]], [[WHILE_BODY]] ]
 ; EPILOG-NEXT:    [[NITER:%.*]] = phi i32 [ 0, [[ENTRY_NEW]] ], [ [[NITER_NEXT_1:%.*]], [[WHILE_BODY]] ]
 ; EPILOG-NEXT:    [[INC:%.*]] = add nuw nsw i32 [[I]], 1
-; EPILOG-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i32 [[NITER]], 1
-; EPILOG-NEXT:    [[INC_1]] = add i32 [[INC]], 1
-; EPILOG-NEXT:    [[NITER_NEXT_1]] = add i32 [[NITER_NEXT]], 1
+; EPILOG-NEXT:    [[INC_1]] = add i32 [[I]], 2
+; EPILOG-NEXT:    [[NITER_NEXT_1]] = add i32 [[NITER]], 2
 ; EPILOG-NEXT:    [[NITER_NCMP_1:%.*]] = icmp eq i32 [[NITER_NEXT_1]], [[UNROLL_ITER]]
 ; EPILOG-NEXT:    br i1 [[NITER_NCMP_1]], label [[WHILE_END_UNR_LCSSA_LOOPEXIT:%.*]], label [[WHILE_BODY]], !llvm.loop [[LOOP0:![0-9]+]]
 ; EPILOG:       while.end.unr-lcssa.loopexit:
@@ -68,7 +67,7 @@ define i32 @foo(i32 %N) {
 ; PROLOG-NEXT:    [[I:%.*]] = phi i32 [ [[I_UNR]], [[ENTRY_NEW]] ], [ [[INC_1:%.*]], [[WHILE_BODY]] ]
 ; PROLOG-NEXT:    [[INC:%.*]] = add i32 [[I]], 1
 ; PROLOG-NEXT:    [[CMP_1:%.*]] = icmp eq i32 [[INC]], [[N]]
-; PROLOG-NEXT:    [[INC_1]] = add i32 [[INC]], 1
+; PROLOG-NEXT:    [[INC_1]] = add i32 [[I]], 2
 ; PROLOG-NEXT:    br i1 [[CMP_1]], label [[WHILE_END_UNR_LCSSA:%.*]], label [[WHILE_BODY]], !llvm.loop [[LOOP0:![0-9]+]]
 ; PROLOG:       while.end.unr-lcssa:
 ; PROLOG-NEXT:    [[I_LCSSA_PH:%.*]] = phi i32 [ [[INC]], [[WHILE_BODY]] ]

diff  --git a/llvm/test/Transforms/LoopUnroll/unroll-header-exiting-with-phis.ll b/llvm/test/Transforms/LoopUnroll/unroll-header-exiting-with-phis.ll
index b690f0d2e61fff..ff8e6efbbaee10 100644
--- a/llvm/test/Transforms/LoopUnroll/unroll-header-exiting-with-phis.ll
+++ b/llvm/test/Transforms/LoopUnroll/unroll-header-exiting-with-phis.ll
@@ -65,11 +65,11 @@ define i16 @partial_unroll(ptr %A) {
 ; CHECK-NEXT:    [[TMP2_1]] = load i16, ptr [[PTR_1]], align 2
 ; CHECK-NEXT:    br label [[FOR_COND_CLEANUP3_1]]
 ; CHECK:       for.cond.cleanup3.1:
-; CHECK-NEXT:    [[INC9_1:%.*]] = add nuw nsw i64 [[INC9]], 1
+; CHECK-NEXT:    [[INC9_1:%.*]] = add nuw nsw i64 [[I_0]], 2
 ; CHECK-NEXT:    [[CMP_2:%.*]] = icmp ult i64 [[INC9_1]], 200
 ; CHECK-NEXT:    br i1 [[CMP_2]], label [[FOR_COND_CLEANUP3_2]], label [[FOR_COND_CLEANUP:%.*]]
 ; CHECK:       for.cond.cleanup3.2:
-; CHECK-NEXT:    [[INC9_2]] = add nuw nsw i64 [[INC9_1]], 1
+; CHECK-NEXT:    [[INC9_2]] = add nuw nsw i64 [[I_0]], 3
 ; CHECK-NEXT:    br label [[FOR_COND]]
 ;
 entry:

diff  --git a/llvm/test/Transforms/LoopUnroll/unroll-opt-attribute.ll b/llvm/test/Transforms/LoopUnroll/unroll-opt-attribute.ll
index 6bac35754ee274..8221e6a95d8d03 100644
--- a/llvm/test/Transforms/LoopUnroll/unroll-opt-attribute.ll
+++ b/llvm/test/Transforms/LoopUnroll/unroll-opt-attribute.ll
@@ -25,10 +25,7 @@ exit:
 
 ; CHECK_COUNT4-LABEL: @Test1
 ; CHECK_COUNT4:      phi
-; CHECK_COUNT4-NEXT: add
-; CHECK_COUNT4-NEXT: add
-; CHECK_COUNT4-NEXT: add
-; CHECK_COUNT4-NEXT: add
+; CHECK_COUNT4-NEXT: add{{.*}}, 4
 ; CHECK_COUNT4-NEXT: icmp
 
 

diff  --git a/llvm/test/Transforms/LoopUnrollAndJam/dependencies_visit_order.ll b/llvm/test/Transforms/LoopUnrollAndJam/dependencies_visit_order.ll
index 9444d59f343d01..f1a5adf096a553 100644
--- a/llvm/test/Transforms/LoopUnrollAndJam/dependencies_visit_order.ll
+++ b/llvm/test/Transforms/LoopUnrollAndJam/dependencies_visit_order.ll
@@ -15,25 +15,22 @@ define void @test1() {
 ; CHECK-NEXT:    [[I4017:%.*]] = zext i16 [[I10]] to i64
 ; CHECK-NEXT:    [[I13_I:%.*]] = add nuw nsw i64 [[I4017]], 1
 ; CHECK-NEXT:    [[I42:%.*]] = trunc i64 [[I13_I]] to i16
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i16 [[NITER]], 1
 ; CHECK-NEXT:    [[I4017_1:%.*]] = zext i16 [[I42]] to i64
 ; CHECK-NEXT:    [[I13_I_1:%.*]] = add nuw nsw i64 [[I4017_1]], 1
 ; CHECK-NEXT:    [[I42_1:%.*]] = trunc i64 [[I13_I_1]] to i16
-; CHECK-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i16 [[NITER_NEXT]], 1
 ; CHECK-NEXT:    [[I4017_2:%.*]] = zext i16 [[I42_1]] to i64
 ; CHECK-NEXT:    [[I13_I_2:%.*]] = add nuw nsw i64 [[I4017_2]], 1
 ; CHECK-NEXT:    [[I42_2:%.*]] = trunc i64 [[I13_I_2]] to i16
-; CHECK-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i16 [[NITER_NEXT_1]], 1
 ; CHECK-NEXT:    [[I4017_3:%.*]] = zext i16 [[I42_2]] to i64
 ; CHECK-NEXT:    [[I13_I_3:%.*]] = add nuw nsw i64 [[I4017_3]], 1
 ; CHECK-NEXT:    [[I42_3]] = trunc i64 [[I13_I_3]] to i16
-; CHECK-NEXT:    [[NITER_NEXT_3]] = add nuw i16 [[NITER_NEXT_2]], 1
+; CHECK-NEXT:    [[NITER_NEXT_3]] = add nuw i16 [[NITER]], 4
 ; CHECK-NEXT:    br label [[BB10_PREHEADER:%.*]]
 ; CHECK:       bb10.preheader:
 ; CHECK-NEXT:    br i1 true, label [[BB38]], label [[BB10_PREHEADER]]
 ; CHECK:       bb38:
 ; CHECK-NEXT:    [[NITER_NCMP_3:%.*]] = icmp eq i16 [[NITER_NEXT_3]], -28
-; CHECK-NEXT:    br i1 [[NITER_NCMP_3]], label [[BB1_BB43_CRIT_EDGE_UNR_LCSSA_LOOPEXIT:%.*]], label [[BB5_PREHEADER]], !llvm.loop [[LOOP1:![0-9]+]]
+; CHECK-NEXT:    br i1 [[NITER_NCMP_3]], label [[BB1_BB43_CRIT_EDGE_UNR_LCSSA_LOOPEXIT:%.*]], label [[BB5_PREHEADER]], !llvm.loop [[LOOP0:![0-9]+]]
 ; CHECK:       bb1.bb43_crit_edge.unr-lcssa.loopexit:
 ; CHECK-NEXT:    [[I10_UNR_PH:%.*]] = phi i16 [ [[I42_3]], [[BB38]] ]
 ; CHECK-NEXT:    br label [[BB1_BB43_CRIT_EDGE_UNR_LCSSA]]
@@ -56,7 +53,7 @@ define void @test1() {
 ; CHECK-NEXT:    [[I3_NOT_EPIL:%.*]] = icmp eq i16 [[I10_EPIL]], -27
 ; CHECK-NEXT:    [[EPIL_ITER_NEXT]] = add i16 [[EPIL_ITER]], 1
 ; CHECK-NEXT:    [[EPIL_ITER_CMP:%.*]] = icmp ne i16 [[EPIL_ITER_NEXT]], 2
-; CHECK-NEXT:    br i1 [[EPIL_ITER_CMP]], label [[BB5_PREHEADER_EPIL]], label [[BB1_BB43_CRIT_EDGE_EPILOG_LCSSA:%.*]], !llvm.loop [[LOOP3:![0-9]+]]
+; CHECK-NEXT:    br i1 [[EPIL_ITER_CMP]], label [[BB5_PREHEADER_EPIL]], label [[BB1_BB43_CRIT_EDGE_EPILOG_LCSSA:%.*]], !llvm.loop [[LOOP2:![0-9]+]]
 ; CHECK:       bb1.bb43_crit_edge.epilog-lcssa:
 ; CHECK-NEXT:    br label [[BB1_BB43_CRIT_EDGE]]
 ; CHECK:       bb1.bb43_crit_edge:

diff  --git a/llvm/test/Transforms/LoopUnrollAndJam/unroll-and-jam.ll b/llvm/test/Transforms/LoopUnrollAndJam/unroll-and-jam.ll
index a2dd64e7d99bcf..f9f7da5fca6b41 100644
--- a/llvm/test/Transforms/LoopUnrollAndJam/unroll-and-jam.ll
+++ b/llvm/test/Transforms/LoopUnrollAndJam/unroll-and-jam.ll
@@ -24,13 +24,10 @@ define void @test1(i32 %I, i32 %E, ptr noalias nocapture %A, ptr noalias nocaptu
 ; CHECK-NEXT:    [[I:%.*]] = phi i32 [ [[ADD8_3:%.*]], [[FOR_LATCH:%.*]] ], [ 0, [[FOR_OUTER_PREHEADER_NEW]] ]
 ; CHECK-NEXT:    [[NITER:%.*]] = phi i32 [ 0, [[FOR_OUTER_PREHEADER_NEW]] ], [ [[NITER_NEXT_3:%.*]], [[FOR_LATCH]] ]
 ; CHECK-NEXT:    [[ADD8:%.*]] = add nuw nsw i32 [[I]], 1
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i32 [[NITER]], 1
-; CHECK-NEXT:    [[ADD8_1:%.*]] = add nuw nsw i32 [[ADD8]], 1
-; CHECK-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i32 [[NITER_NEXT]], 1
-; CHECK-NEXT:    [[ADD8_2:%.*]] = add nuw nsw i32 [[ADD8_1]], 1
-; CHECK-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i32 [[NITER_NEXT_1]], 1
-; CHECK-NEXT:    [[ADD8_3]] = add nuw i32 [[ADD8_2]], 1
-; CHECK-NEXT:    [[NITER_NEXT_3]] = add i32 [[NITER_NEXT_2]], 1
+; CHECK-NEXT:    [[ADD8_1:%.*]] = add nuw nsw i32 [[I]], 2
+; CHECK-NEXT:    [[ADD8_2:%.*]] = add nuw nsw i32 [[I]], 3
+; CHECK-NEXT:    [[ADD8_3]] = add nuw i32 [[I]], 4
+; CHECK-NEXT:    [[NITER_NEXT_3]] = add i32 [[NITER]], 4
 ; CHECK-NEXT:    br label [[FOR_INNER:%.*]]
 ; CHECK:       for.inner:
 ; CHECK-NEXT:    [[J:%.*]] = phi i32 [ 0, [[FOR_OUTER]] ], [ [[INC:%.*]], [[FOR_INNER]] ]
@@ -116,7 +113,7 @@ define void @test1(i32 %I, i32 %E, ptr noalias nocapture %A, ptr noalias nocaptu
 ; CHECK-NEXT:    [[ADD_LCSSA_EPIL_1:%.*]] = phi i32 [ [[ADD_EPIL_1]], [[FOR_INNER_EPIL_1]] ]
 ; CHECK-NEXT:    [[ARRAYIDX6_EPIL_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD8_EPIL]]
 ; CHECK-NEXT:    store i32 [[ADD_LCSSA_EPIL_1]], ptr [[ARRAYIDX6_EPIL_1]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD8_EPIL_1:%.*]] = add nuw i32 [[ADD8_EPIL]], 1
+; CHECK-NEXT:    [[ADD8_EPIL_1:%.*]] = add nuw i32 [[I_UNR]], 2
 ; CHECK-NEXT:    [[EPIL_ITER_CMP_1:%.*]] = icmp ne i32 2, [[XTRAITER]]
 ; CHECK-NEXT:    br i1 [[EPIL_ITER_CMP_1]], label [[FOR_OUTER_EPIL_2:%.*]], label [[FOR_END_LOOPEXIT_EPILOG_LCSSA]]
 ; CHECK:       for.outer.epil.2:
@@ -204,19 +201,16 @@ define void @test2(i32 %I, i32 %E, ptr noalias nocapture %A, ptr noalias nocaptu
 ; CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[A:%.*]], i32 [[I]]
 ; CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[ARRAYIDX]], align 4, !tbaa [[TBAA0]]
 ; CHECK-NEXT:    [[ADD9:%.*]] = add nuw nsw i32 [[I]], 1
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i32 [[NITER]], 1
 ; CHECK-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD9]]
 ; CHECK-NEXT:    [[TMP3:%.*]] = load i32, ptr [[ARRAYIDX_1]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD9_1:%.*]] = add nuw nsw i32 [[ADD9]], 1
-; CHECK-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i32 [[NITER_NEXT]], 1
+; CHECK-NEXT:    [[ADD9_1:%.*]] = add nuw nsw i32 [[I]], 2
 ; CHECK-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD9_1]]
 ; CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[ARRAYIDX_2]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD9_2:%.*]] = add nuw nsw i32 [[ADD9_1]], 1
-; CHECK-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i32 [[NITER_NEXT_1]], 1
+; CHECK-NEXT:    [[ADD9_2:%.*]] = add nuw nsw i32 [[I]], 3
 ; CHECK-NEXT:    [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD9_2]]
 ; CHECK-NEXT:    [[TMP5:%.*]] = load i32, ptr [[ARRAYIDX_3]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD9_3]] = add nuw i32 [[ADD9_2]], 1
-; CHECK-NEXT:    [[NITER_NEXT_3]] = add i32 [[NITER_NEXT_2]], 1
+; CHECK-NEXT:    [[ADD9_3]] = add nuw i32 [[I]], 4
+; CHECK-NEXT:    [[NITER_NEXT_3]] = add i32 [[NITER]], 4
 ; CHECK-NEXT:    br label [[FOR_INNER:%.*]]
 ; CHECK:       for.inner:
 ; CHECK-NEXT:    [[J:%.*]] = phi i32 [ 0, [[FOR_OUTER]] ], [ [[INC:%.*]], [[FOR_INNER]] ]
@@ -300,7 +294,7 @@ define void @test2(i32 %I, i32 %E, ptr noalias nocapture %A, ptr noalias nocaptu
 ; CHECK:       for.latch.epil.1:
 ; CHECK-NEXT:    [[ADD_LCSSA_EPIL_1:%.*]] = phi i32 [ [[ADD_EPIL_1]], [[FOR_INNER_EPIL_1]] ]
 ; CHECK-NEXT:    store i32 [[ADD_LCSSA_EPIL_1]], ptr [[ARRAYIDX_EPIL_1]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD9_EPIL_1:%.*]] = add nuw i32 [[ADD9_EPIL]], 1
+; CHECK-NEXT:    [[ADD9_EPIL_1:%.*]] = add nuw i32 [[I_UNR]], 2
 ; CHECK-NEXT:    [[EPIL_ITER_CMP_1:%.*]] = icmp ne i32 2, [[XTRAITER]]
 ; CHECK-NEXT:    br i1 [[EPIL_ITER_CMP_1]], label [[FOR_OUTER_EPIL_2:%.*]], label [[FOR_END10_LOOPEXIT_EPILOG_LCSSA]]
 ; CHECK:       for.outer.epil.2:
@@ -623,14 +617,8 @@ define i32 @test6() #0 {
 ; CHECK:       for.outer:
 ; CHECK-NEXT:    [[INC5_SINK9:%.*]] = phi i32 [ 2, [[ENTRY_NEW]] ], [ [[INC5_3:%.*]], [[FOR_LATCH:%.*]] ]
 ; CHECK-NEXT:    [[NITER:%.*]] = phi i32 [ 0, [[ENTRY_NEW]] ], [ [[NITER_NEXT_3:%.*]], [[FOR_LATCH]] ]
-; CHECK-NEXT:    [[INC5:%.*]] = add nuw nsw i32 [[INC5_SINK9]], 1
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i32 [[NITER]], 1
-; CHECK-NEXT:    [[INC5_1:%.*]] = add nuw nsw i32 [[INC5]], 1
-; CHECK-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i32 [[NITER_NEXT]], 1
-; CHECK-NEXT:    [[INC5_2:%.*]] = add nuw nsw i32 [[INC5_1]], 1
-; CHECK-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i32 [[NITER_NEXT_1]], 1
-; CHECK-NEXT:    [[INC5_3]] = add nuw nsw i32 [[INC5_2]], 1
-; CHECK-NEXT:    [[NITER_NEXT_3]] = add nuw nsw i32 [[NITER_NEXT_2]], 1
+; CHECK-NEXT:    [[INC5_3]] = add nuw nsw i32 [[INC5_SINK9]], 4
+; CHECK-NEXT:    [[NITER_NEXT_3]] = add nuw nsw i32 [[NITER]], 4
 ; CHECK-NEXT:    br label [[FOR_INNER:%.*]]
 ; CHECK:       for.inner:
 ; CHECK-NEXT:    [[INC_SINK8:%.*]] = phi i32 [ 0, [[FOR_OUTER]] ], [ [[INC:%.*]], [[FOR_INNER]] ]
@@ -727,25 +715,22 @@ define void @test7(i32 %I, i32 %E, ptr noalias nocapture %A, ptr noalias nocaptu
 ; CHECK-NEXT:    [[ADD:%.*]] = add nuw nsw i32 [[I]], 1
 ; CHECK-NEXT:    [[ARRAYIDX2:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD]]
 ; CHECK-NEXT:    store i32 2, ptr [[ARRAYIDX2]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i32 [[NITER]], 1
 ; CHECK-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD]]
 ; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX_1]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD_1:%.*]] = add nuw nsw i32 [[ADD]], 1
+; CHECK-NEXT:    [[ADD_1:%.*]] = add nuw nsw i32 [[I]], 2
 ; CHECK-NEXT:    [[ARRAYIDX2_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_1]]
 ; CHECK-NEXT:    store i32 2, ptr [[ARRAYIDX2_1]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i32 [[NITER_NEXT]], 1
 ; CHECK-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_1]]
 ; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX_2]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD_2:%.*]] = add nuw nsw i32 [[ADD_1]], 1
+; CHECK-NEXT:    [[ADD_2:%.*]] = add nuw nsw i32 [[I]], 3
 ; CHECK-NEXT:    [[ARRAYIDX2_2:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_2]]
 ; CHECK-NEXT:    store i32 2, ptr [[ARRAYIDX2_2]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i32 [[NITER_NEXT_1]], 1
 ; CHECK-NEXT:    [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_2]]
 ; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX_3]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD_3]] = add nuw i32 [[ADD_2]], 1
+; CHECK-NEXT:    [[ADD_3]] = add nuw i32 [[I]], 4
 ; CHECK-NEXT:    [[ARRAYIDX2_3:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_3]]
 ; CHECK-NEXT:    store i32 2, ptr [[ARRAYIDX2_3]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[NITER_NEXT_3]] = add i32 [[NITER_NEXT_2]], 1
+; CHECK-NEXT:    [[NITER_NEXT_3]] = add i32 [[NITER]], 4
 ; CHECK-NEXT:    br label [[FOR_INNER:%.*]]
 ; CHECK:       for.latch:
 ; CHECK-NEXT:    [[ADD9_LCSSA:%.*]] = phi i32 [ [[ADD9:%.*]], [[FOR_INNER]] ]
@@ -818,7 +803,7 @@ define void @test7(i32 %I, i32 %E, ptr noalias nocapture %A, ptr noalias nocaptu
 ; CHECK:       for.outer.epil.1:
 ; CHECK-NEXT:    [[ARRAYIDX_EPIL_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_EPIL]]
 ; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX_EPIL_1]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD_EPIL_1:%.*]] = add nuw i32 [[ADD_EPIL]], 1
+; CHECK-NEXT:    [[ADD_EPIL_1:%.*]] = add nuw i32 [[I_UNR]], 2
 ; CHECK-NEXT:    [[ARRAYIDX2_EPIL_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_EPIL_1]]
 ; CHECK-NEXT:    store i32 2, ptr [[ARRAYIDX2_EPIL_1]], align 4, !tbaa [[TBAA0]]
 ; CHECK-NEXT:    br label [[FOR_INNER_EPIL_1:%.*]]
@@ -839,7 +824,7 @@ define void @test7(i32 %I, i32 %E, ptr noalias nocapture %A, ptr noalias nocaptu
 ; CHECK:       for.outer.epil.2:
 ; CHECK-NEXT:    [[ARRAYIDX_EPIL_2:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_EPIL_1]]
 ; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX_EPIL_2]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD_EPIL_2:%.*]] = add nuw i32 [[ADD_EPIL_1]], 1
+; CHECK-NEXT:    [[ADD_EPIL_2:%.*]] = add nuw i32 [[I_UNR]], 3
 ; CHECK-NEXT:    [[ARRAYIDX2_EPIL_2:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_EPIL_2]]
 ; CHECK-NEXT:    store i32 2, ptr [[ARRAYIDX2_EPIL_2]], align 4, !tbaa [[TBAA0]]
 ; CHECK-NEXT:    br label [[FOR_INNER_EPIL_2:%.*]]
@@ -928,25 +913,22 @@ define void @test8(i32 %I, i32 %E, ptr noalias nocapture %A, ptr noalias nocaptu
 ; CHECK-NEXT:    [[ADD:%.*]] = add nuw nsw i32 [[I]], 1
 ; CHECK-NEXT:    [[ARRAYIDX6:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD]]
 ; CHECK-NEXT:    store i32 2, ptr [[ARRAYIDX6]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i32 [[NITER]], 1
 ; CHECK-NEXT:    [[ARRAYIDX_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD]]
 ; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX_1]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD_1:%.*]] = add nuw nsw i32 [[ADD]], 1
+; CHECK-NEXT:    [[ADD_1:%.*]] = add nuw nsw i32 [[I]], 2
 ; CHECK-NEXT:    [[ARRAYIDX6_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_1]]
 ; CHECK-NEXT:    store i32 2, ptr [[ARRAYIDX6_1]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i32 [[NITER_NEXT]], 1
 ; CHECK-NEXT:    [[ARRAYIDX_2:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_1]]
 ; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX_2]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD_2:%.*]] = add nuw nsw i32 [[ADD_1]], 1
+; CHECK-NEXT:    [[ADD_2:%.*]] = add nuw nsw i32 [[I]], 3
 ; CHECK-NEXT:    [[ARRAYIDX6_2:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_2]]
 ; CHECK-NEXT:    store i32 2, ptr [[ARRAYIDX6_2]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i32 [[NITER_NEXT_1]], 1
 ; CHECK-NEXT:    [[ARRAYIDX_3:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_2]]
 ; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX_3]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD_3]] = add nuw i32 [[ADD_2]], 1
+; CHECK-NEXT:    [[ADD_3]] = add nuw i32 [[I]], 4
 ; CHECK-NEXT:    [[ARRAYIDX6_3:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_3]]
 ; CHECK-NEXT:    store i32 2, ptr [[ARRAYIDX6_3]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[NITER_NEXT_3]] = add i32 [[NITER_NEXT_2]], 1
+; CHECK-NEXT:    [[NITER_NEXT_3]] = add i32 [[NITER]], 4
 ; CHECK-NEXT:    br label [[FOR_INNER:%.*]]
 ; CHECK:       for.inner:
 ; CHECK-NEXT:    [[SUM:%.*]] = phi i32 [ 0, [[FOR_OUTER]] ], [ [[ADD9:%.*]], [[FOR_INNER]] ]
@@ -1019,7 +1001,7 @@ define void @test8(i32 %I, i32 %E, ptr noalias nocapture %A, ptr noalias nocaptu
 ; CHECK:       for.outer.epil.1:
 ; CHECK-NEXT:    [[ARRAYIDX_EPIL_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_EPIL]]
 ; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX_EPIL_1]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD_EPIL_1:%.*]] = add nuw i32 [[ADD_EPIL]], 1
+; CHECK-NEXT:    [[ADD_EPIL_1:%.*]] = add nuw i32 [[I_UNR]], 2
 ; CHECK-NEXT:    [[ARRAYIDX6_EPIL_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_EPIL_1]]
 ; CHECK-NEXT:    store i32 2, ptr [[ARRAYIDX6_EPIL_1]], align 4, !tbaa [[TBAA0]]
 ; CHECK-NEXT:    br label [[FOR_INNER_EPIL_1:%.*]]
@@ -1040,7 +1022,7 @@ define void @test8(i32 %I, i32 %E, ptr noalias nocapture %A, ptr noalias nocaptu
 ; CHECK:       for.outer.epil.2:
 ; CHECK-NEXT:    [[ARRAYIDX_EPIL_2:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_EPIL_1]]
 ; CHECK-NEXT:    store i32 0, ptr [[ARRAYIDX_EPIL_2]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD_EPIL_2:%.*]] = add nuw i32 [[ADD_EPIL_1]], 1
+; CHECK-NEXT:    [[ADD_EPIL_2:%.*]] = add nuw i32 [[I_UNR]], 3
 ; CHECK-NEXT:    [[ARRAYIDX6_EPIL_2:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD_EPIL_2]]
 ; CHECK-NEXT:    store i32 2, ptr [[ARRAYIDX6_EPIL_2]], align 4, !tbaa [[TBAA0]]
 ; CHECK-NEXT:    br label [[FOR_INNER_EPIL_2:%.*]]
@@ -1135,13 +1117,10 @@ define void @test9(i32 %I, i32 %E, ptr nocapture %A, ptr nocapture readonly %B)
 ; CHECK-NEXT:    [[I:%.*]] = phi i32 [ [[ADD8_3:%.*]], [[FOR_LATCH:%.*]] ], [ 0, [[FOR_OUTER_PREHEADER_NEW]] ]
 ; CHECK-NEXT:    [[NITER:%.*]] = phi i32 [ 0, [[FOR_OUTER_PREHEADER_NEW]] ], [ [[NITER_NEXT_3:%.*]], [[FOR_LATCH]] ]
 ; CHECK-NEXT:    [[ADD8:%.*]] = add nuw nsw i32 [[I]], 1
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i32 [[NITER]], 1
-; CHECK-NEXT:    [[ADD8_1:%.*]] = add nuw nsw i32 [[ADD8]], 1
-; CHECK-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i32 [[NITER_NEXT]], 1
-; CHECK-NEXT:    [[ADD8_2:%.*]] = add nuw nsw i32 [[ADD8_1]], 1
-; CHECK-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i32 [[NITER_NEXT_1]], 1
-; CHECK-NEXT:    [[ADD8_3]] = add nuw i32 [[ADD8_2]], 1
-; CHECK-NEXT:    [[NITER_NEXT_3]] = add i32 [[NITER_NEXT_2]], 1
+; CHECK-NEXT:    [[ADD8_1:%.*]] = add nuw nsw i32 [[I]], 2
+; CHECK-NEXT:    [[ADD8_2:%.*]] = add nuw nsw i32 [[I]], 3
+; CHECK-NEXT:    [[ADD8_3]] = add nuw i32 [[I]], 4
+; CHECK-NEXT:    [[NITER_NEXT_3]] = add i32 [[NITER]], 4
 ; CHECK-NEXT:    br label [[FOR_INNER:%.*]]
 ; CHECK:       for.inner:
 ; CHECK-NEXT:    [[J:%.*]] = phi i32 [ 0, [[FOR_OUTER]] ], [ [[INC:%.*]], [[FOR_INNER]] ]
@@ -1233,7 +1212,7 @@ define void @test9(i32 %I, i32 %E, ptr nocapture %A, ptr nocapture readonly %B)
 ; CHECK-NEXT:    [[ADD_LCSSA_EPIL_1:%.*]] = phi i32 [ [[ADD_EPIL_1]], [[FOR_INNER_EPIL_1]] ]
 ; CHECK-NEXT:    [[ARRAYIDX6_EPIL_1:%.*]] = getelementptr inbounds i32, ptr [[A]], i32 [[ADD8_EPIL]]
 ; CHECK-NEXT:    store i32 [[ADD_LCSSA_EPIL_1]], ptr [[ARRAYIDX6_EPIL_1]], align 4, !tbaa [[TBAA0]]
-; CHECK-NEXT:    [[ADD8_EPIL_1:%.*]] = add nuw i32 [[ADD8_EPIL]], 1
+; CHECK-NEXT:    [[ADD8_EPIL_1:%.*]] = add nuw i32 [[I_UNR]], 2
 ; CHECK-NEXT:    [[EPIL_ITER_CMP_1:%.*]] = icmp ne i32 2, [[XTRAITER]]
 ; CHECK-NEXT:    br i1 [[EPIL_ITER_CMP_1]], label [[FOR_OUTER_EPIL_2:%.*]], label [[FOR_END_LOOPEXIT_EPILOG_LCSSA]]
 ; CHECK:       for.outer.epil.2:
@@ -1316,14 +1295,8 @@ define signext i16 @test10(i32 %k) #0 {
 ; CHECK:       for.body:
 ; CHECK-NEXT:    [[STOREMERGE82:%.*]] = phi i64 [ 0, [[ENTRY_NEW]] ], [ [[INC25_3:%.*]], [[FOR_INC24:%.*]] ]
 ; CHECK-NEXT:    [[NITER:%.*]] = phi i64 [ 0, [[ENTRY_NEW]] ], [ [[NITER_NEXT_3:%.*]], [[FOR_INC24]] ]
-; CHECK-NEXT:    [[INC25:%.*]] = add nuw nsw i64 [[STOREMERGE82]], 1
-; CHECK-NEXT:    [[NITER_NEXT:%.*]] = add nuw nsw i64 [[NITER]], 1
-; CHECK-NEXT:    [[INC25_1:%.*]] = add nuw nsw i64 [[INC25]], 1
-; CHECK-NEXT:    [[NITER_NEXT_1:%.*]] = add nuw nsw i64 [[NITER_NEXT]], 1
-; CHECK-NEXT:    [[INC25_2:%.*]] = add nuw nsw i64 [[INC25_1]], 1
-; CHECK-NEXT:    [[NITER_NEXT_2:%.*]] = add nuw nsw i64 [[NITER_NEXT_1]], 1
-; CHECK-NEXT:    [[INC25_3]] = add nuw nsw i64 [[INC25_2]], 1
-; CHECK-NEXT:    [[NITER_NEXT_3]] = add nuw nsw i64 [[NITER_NEXT_2]], 1
+; CHECK-NEXT:    [[INC25_3]] = add nuw nsw i64 [[STOREMERGE82]], 4
+; CHECK-NEXT:    [[NITER_NEXT_3]] = add nuw nsw i64 [[NITER]], 4
 ; CHECK-NEXT:    br label [[FOR_BODY2:%.*]]
 ; CHECK:       for.body2:
 ; CHECK-NEXT:    [[STOREMERGE:%.*]] = phi i64 [ 4, [[FOR_BODY]] ], [ [[DEC:%.*]], [[FOR_INC21_3:%.*]] ]


        


More information about the llvm-commits mailing list