[llvm] 5493492 - [test] Remove a redundant test line
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 17 17:34:40 PDT 2021
Author: Philip Reames
Date: 2021-08-17T17:34:35-07:00
New Revision: 54934923b92d6def01d67ccc6be678a6652f3757
URL: https://github.com/llvm/llvm-project/commit/54934923b92d6def01d67ccc6be678a6652f3757
DIFF: https://github.com/llvm/llvm-project/commit/54934923b92d6def01d67ccc6be678a6652f3757.diff
LOG: [test] Remove a redundant test line
This was made redundant when I removed -instcombine from output in 70ffd65c, but I didn't notice. nikic pointed that out in review of D107381
Added:
Modified:
llvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll b/llvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll
index c52575e4b03a3..fc332a6c005a8 100644
--- a/llvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll
+++ b/llvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll
@@ -1,5 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: -p
-; RUN: opt < %s -loop-unroll -unroll-runtime=true -unroll-runtime-epilog=true -unroll-runtime-multi-exit=true -verify-loop-lcssa -verify-dom-info -verify-loop-info -S | FileCheck %s -check-prefixes=CHECK,EPILOG-NO-IC
; RUN: opt < %s -loop-unroll -unroll-runtime=true -unroll-runtime-epilog=true -unroll-runtime-multi-exit=true -verify-loop-lcssa -verify-dom-info -verify-loop-info -S | FileCheck %s -check-prefixes=CHECK,EPILOG
; RUN: opt < %s -loop-unroll -unroll-runtime -unroll-count=2 -unroll-runtime-epilog=true -unroll-runtime-multi-exit=true -verify-loop-lcssa -verify-dom-info -verify-loop-info -S | FileCheck %s -check-prefixes=CHECK,EPILOG-BLOCK
; RUN: opt < %s -loop-unroll -unroll-runtime=true -unroll-runtime-epilog=false -unroll-runtime-multi-exit=true -verify-loop-lcssa -verify-dom-info -verify-loop-info -S | FileCheck %s -check-prefixes=CHECK,PROLOG
@@ -10,124 +9,6 @@
; test with three exiting and three exit blocks.
; none of the exit blocks have successors
define void @test1(i64 %trip, i1 %cond) {
-; EPILOG-NO-IC-LABEL: @test1(
-; EPILOG-NO-IC-NEXT: entry:
-; EPILOG-NO-IC-NEXT: %0 = add i64 %trip, -1
-; EPILOG-NO-IC-NEXT: %xtraiter = and i64 %trip, 7
-; EPILOG-NO-IC-NEXT: %1 = icmp ult i64 %0, 7
-; EPILOG-NO-IC-NEXT: br i1 %1, label %exit2.loopexit.unr-lcssa, label %entry.new
-; EPILOG-NO-IC: entry.new:
-; EPILOG-NO-IC-NEXT: %unroll_iter = sub i64 %trip, %xtraiter
-; EPILOG-NO-IC-NEXT: br label %loop_header
-; EPILOG-NO-IC: loop_header:
-; EPILOG-NO-IC-NEXT: %iv = phi i64 [ 0, %entry.new ], [ %iv_next.7, %loop_latch.7 ]
-; EPILOG-NO-IC-NEXT: %niter = phi i64 [ %unroll_iter, %entry.new ], [ %niter.nsub.7, %loop_latch.7 ]
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch, label %loop_exiting_bb1
-; EPILOG-NO-IC: loop_exiting_bb1:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_exiting_bb2, label %exit1.loopexit
-; EPILOG-NO-IC: loop_exiting_bb2:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_latch, label %exit3.loopexit
-; EPILOG-NO-IC: exit3.loopexit:
-; EPILOG-NO-IC-NEXT: br label %exit3
-; EPILOG-NO-IC: exit3.loopexit2:
-; EPILOG-NO-IC-NEXT: br label %exit3
-; EPILOG-NO-IC: exit3:
-; EPILOG-NO-IC-NEXT: ret void
-; EPILOG-NO-IC: loop_latch:
-; EPILOG-NO-IC-NEXT: %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub = sub i64 %niter, 1
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.1, label %loop_exiting_bb1.1
-; EPILOG-NO-IC: exit1.loopexit:
-; EPILOG-NO-IC-NEXT: br label %exit1
-; EPILOG-NO-IC: exit1.loopexit1:
-; EPILOG-NO-IC-NEXT: br label %exit1
-; EPILOG-NO-IC: exit1:
-; EPILOG-NO-IC-NEXT: ret void
-; EPILOG-NO-IC: exit2.loopexit.unr-lcssa.loopexit:
-; EPILOG-NO-IC-NEXT: %iv.unr.ph = phi i64 [ %iv_next.7, %loop_latch.7 ]
-; EPILOG-NO-IC-NEXT: br label %exit2.loopexit.unr-lcssa
-; EPILOG-NO-IC: exit2.loopexit.unr-lcssa:
-; EPILOG-NO-IC-NEXT: %iv.unr = phi i64 [ 0, %entry ], [ %iv.unr.ph, %exit2.loopexit.unr-lcssa.loopexit ]
-; EPILOG-NO-IC-NEXT: %lcmp.mod = icmp ne i64 %xtraiter, 0
-; EPILOG-NO-IC-NEXT: br i1 %lcmp.mod, label %loop_header.epil.preheader, label %exit2.loopexit
-; EPILOG-NO-IC: loop_header.epil.preheader:
-; EPILOG-NO-IC-NEXT: br label %loop_header.epil
-; EPILOG-NO-IC: loop_header.epil:
-; EPILOG-NO-IC-NEXT: %iv.epil = phi i64 [ %iv.unr, %loop_header.epil.preheader ], [ %iv_next.epil, %loop_latch.epil ]
-; EPILOG-NO-IC-NEXT: %epil.iter = phi i64 [ %xtraiter, %loop_header.epil.preheader ], [ %epil.iter.sub, %loop_latch.epil ]
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.epil, label %loop_exiting_bb1.epil
-; EPILOG-NO-IC: loop_exiting_bb1.epil:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_exiting_bb2.epil, label %exit1.loopexit1
-; EPILOG-NO-IC: loop_exiting_bb2.epil:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_latch.epil, label %exit3.loopexit2
-; EPILOG-NO-IC: loop_latch.epil:
-; EPILOG-NO-IC-NEXT: %iv_next.epil = add i64 %iv.epil, 1
-; EPILOG-NO-IC-NEXT: %cmp.epil = icmp ne i64 %iv_next.epil, %trip
-; EPILOG-NO-IC-NEXT: %epil.iter.sub = sub i64 %epil.iter, 1
-; EPILOG-NO-IC-NEXT: %epil.iter.cmp = icmp ne i64 %epil.iter.sub, 0
-; EPILOG-NO-IC-NEXT: br i1 %epil.iter.cmp, label %loop_header.epil, label %exit2.loopexit.epilog-lcssa, !llvm.loop !0
-; EPILOG-NO-IC: exit2.loopexit.epilog-lcssa:
-; EPILOG-NO-IC-NEXT: br label %exit2.loopexit
-; EPILOG-NO-IC: exit2.loopexit:
-; EPILOG-NO-IC-NEXT: ret void
-; EPILOG-NO-IC: loop_exiting_bb1.1:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_exiting_bb2.1, label %exit1.loopexit
-; EPILOG-NO-IC: loop_exiting_bb2.1:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_latch.1, label %exit3.loopexit
-; EPILOG-NO-IC: loop_latch.1:
-; EPILOG-NO-IC-NEXT: %iv_next.1 = add nuw nsw i64 %iv_next, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.1 = sub i64 %niter.nsub, 1
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.2, label %loop_exiting_bb1.2
-; EPILOG-NO-IC: loop_exiting_bb1.2:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_exiting_bb2.2, label %exit1.loopexit
-; EPILOG-NO-IC: loop_exiting_bb2.2:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_latch.2, label %exit3.loopexit
-; EPILOG-NO-IC: loop_latch.2:
-; EPILOG-NO-IC-NEXT: %iv_next.2 = add nuw nsw i64 %iv_next.1, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.2 = sub i64 %niter.nsub.1, 1
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.3, label %loop_exiting_bb1.3
-; EPILOG-NO-IC: loop_exiting_bb1.3:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_exiting_bb2.3, label %exit1.loopexit
-; EPILOG-NO-IC: loop_exiting_bb2.3:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_latch.3, label %exit3.loopexit
-; EPILOG-NO-IC: loop_latch.3:
-; EPILOG-NO-IC-NEXT: %iv_next.3 = add nuw nsw i64 %iv_next.2, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.3 = sub i64 %niter.nsub.2, 1
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.4, label %loop_exiting_bb1.4
-; EPILOG-NO-IC: loop_exiting_bb1.4:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_exiting_bb2.4, label %exit1.loopexit
-; EPILOG-NO-IC: loop_exiting_bb2.4:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_latch.4, label %exit3.loopexit
-; EPILOG-NO-IC: loop_latch.4:
-; EPILOG-NO-IC-NEXT: %iv_next.4 = add nuw nsw i64 %iv_next.3, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.4 = sub i64 %niter.nsub.3, 1
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.5, label %loop_exiting_bb1.5
-; EPILOG-NO-IC: loop_exiting_bb1.5:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_exiting_bb2.5, label %exit1.loopexit
-; EPILOG-NO-IC: loop_exiting_bb2.5:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_latch.5, label %exit3.loopexit
-; EPILOG-NO-IC: loop_latch.5:
-; EPILOG-NO-IC-NEXT: %iv_next.5 = add nuw nsw i64 %iv_next.4, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.5 = sub i64 %niter.nsub.4, 1
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.6, label %loop_exiting_bb1.6
-; EPILOG-NO-IC: loop_exiting_bb1.6:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_exiting_bb2.6, label %exit1.loopexit
-; EPILOG-NO-IC: loop_exiting_bb2.6:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_latch.6, label %exit3.loopexit
-; EPILOG-NO-IC: loop_latch.6:
-; EPILOG-NO-IC-NEXT: %iv_next.6 = add nuw nsw i64 %iv_next.5, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.6 = sub i64 %niter.nsub.5, 1
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.7, label %loop_exiting_bb1.7
-; EPILOG-NO-IC: loop_exiting_bb1.7:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_exiting_bb2.7, label %exit1.loopexit
-; EPILOG-NO-IC: loop_exiting_bb2.7:
-; EPILOG-NO-IC-NEXT: br i1 false, label %loop_latch.7, label %exit3.loopexit
-; EPILOG-NO-IC: loop_latch.7:
-; EPILOG-NO-IC-NEXT: %iv_next.7 = add i64 %iv_next.6, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.7 = sub i64 %niter.nsub.6, 1
-; EPILOG-NO-IC-NEXT: %niter.ncmp.7 = icmp ne i64 %niter.nsub.7, 0
-; EPILOG-NO-IC-NEXT: br i1 %niter.ncmp.7, label %loop_header, label %exit2.loopexit.unr-lcssa.loopexit
-;
; EPILOG-LABEL: @test1(
; EPILOG-NEXT: entry:
; EPILOG-NEXT: %0 = add i64 %trip, -1
@@ -508,147 +389,6 @@ exit2.loopexit:
; %sum.02 and %add. Both of these are incoming values for phi from every exiting
; unrolled block.
define i32 @test2(i32* nocapture %a, i64 %n) {
-; EPILOG-NO-IC-LABEL: @test2(
-; EPILOG-NO-IC-NEXT: entry:
-; EPILOG-NO-IC-NEXT: %0 = add i64 %n, -1
-; EPILOG-NO-IC-NEXT: %xtraiter = and i64 %n, 7
-; EPILOG-NO-IC-NEXT: %1 = icmp ult i64 %0, 7
-; EPILOG-NO-IC-NEXT: br i1 %1, label %for.end.unr-lcssa, label %entry.new
-; EPILOG-NO-IC: entry.new:
-; EPILOG-NO-IC-NEXT: %unroll_iter = sub i64 %n, %xtraiter
-; EPILOG-NO-IC-NEXT: br label %header
-; EPILOG-NO-IC: header:
-; EPILOG-NO-IC-NEXT: %indvars.iv = phi i64 [ 0, %entry.new ], [ %indvars.iv.next.7, %for.body.7 ]
-; EPILOG-NO-IC-NEXT: %sum.02 = phi i32 [ 0, %entry.new ], [ %add.7, %for.body.7 ]
-; EPILOG-NO-IC-NEXT: %niter = phi i64 [ %unroll_iter, %entry.new ], [ %niter.nsub.7, %for.body.7 ]
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block
-; EPILOG-NO-IC: for.exiting_block:
-; EPILOG-NO-IC-NEXT: %cmp = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp, label %for.exit2.loopexit, label %for.body
-; EPILOG-NO-IC: for.body:
-; EPILOG-NO-IC-NEXT: %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv
-; EPILOG-NO-IC-NEXT: %2 = load i32, i32* %arrayidx, align 4
-; EPILOG-NO-IC-NEXT: %add = add nsw i32 %2, %sum.02
-; EPILOG-NO-IC-NEXT: %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub = sub i64 %niter, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block.1
-; EPILOG-NO-IC: for.end.unr-lcssa.loopexit:
-; EPILOG-NO-IC-NEXT: %sum.0.lcssa.ph.ph = phi i32 [ %add.7, %for.body.7 ]
-; EPILOG-NO-IC-NEXT: %indvars.iv.unr.ph = phi i64 [ %indvars.iv.next.7, %for.body.7 ]
-; EPILOG-NO-IC-NEXT: %sum.02.unr.ph = phi i32 [ %add.7, %for.body.7 ]
-; EPILOG-NO-IC-NEXT: br label %for.end.unr-lcssa
-; EPILOG-NO-IC: for.end.unr-lcssa:
-; EPILOG-NO-IC-NEXT: %sum.0.lcssa.ph = phi i32 [ undef, %entry ], [ %sum.0.lcssa.ph.ph, %for.end.unr-lcssa.loopexit ]
-; EPILOG-NO-IC-NEXT: %indvars.iv.unr = phi i64 [ 0, %entry ], [ %indvars.iv.unr.ph, %for.end.unr-lcssa.loopexit ]
-; EPILOG-NO-IC-NEXT: %sum.02.unr = phi i32 [ 0, %entry ], [ %sum.02.unr.ph, %for.end.unr-lcssa.loopexit ]
-; EPILOG-NO-IC-NEXT: %lcmp.mod = icmp ne i64 %xtraiter, 0
-; EPILOG-NO-IC-NEXT: br i1 %lcmp.mod, label %header.epil.preheader, label %for.end
-; EPILOG-NO-IC: header.epil.preheader:
-; EPILOG-NO-IC-NEXT: br label %header.epil
-; EPILOG-NO-IC: header.epil:
-; EPILOG-NO-IC-NEXT: %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %for.body.epil ], [ %indvars.iv.unr, %header.epil.preheader ]
-; EPILOG-NO-IC-NEXT: %sum.02.epil = phi i32 [ %add.epil, %for.body.epil ], [ %sum.02.unr, %header.epil.preheader ]
-; EPILOG-NO-IC-NEXT: %epil.iter = phi i64 [ %xtraiter, %header.epil.preheader ], [ %epil.iter.sub, %for.body.epil ]
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit2, label %for.exiting_block.epil
-; EPILOG-NO-IC: for.exiting_block.epil:
-; EPILOG-NO-IC-NEXT: %cmp.epil = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.epil, label %for.exit2.loopexit2, label %for.body.epil
-; EPILOG-NO-IC: for.body.epil:
-; EPILOG-NO-IC-NEXT: %arrayidx.epil = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.epil
-; EPILOG-NO-IC-NEXT: %3 = load i32, i32* %arrayidx.epil, align 4
-; EPILOG-NO-IC-NEXT: %add.epil = add nsw i32 %3, %sum.02.epil
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.epil = add i64 %indvars.iv.epil, 1
-; EPILOG-NO-IC-NEXT: %exitcond.epil = icmp eq i64 %indvars.iv.next.epil, %n
-; EPILOG-NO-IC-NEXT: %epil.iter.sub = sub i64 %epil.iter, 1
-; EPILOG-NO-IC-NEXT: %epil.iter.cmp = icmp ne i64 %epil.iter.sub, 0
-; EPILOG-NO-IC-NEXT: br i1 %epil.iter.cmp, label %header.epil, label %for.end.epilog-lcssa, !llvm.loop !2
-; EPILOG-NO-IC: for.end.epilog-lcssa:
-; EPILOG-NO-IC-NEXT: %sum.0.lcssa.ph1 = phi i32 [ %add.epil, %for.body.epil ]
-; EPILOG-NO-IC-NEXT: br label %for.end
-; EPILOG-NO-IC: for.end:
-; EPILOG-NO-IC-NEXT: %sum.0.lcssa = phi i32 [ %sum.0.lcssa.ph, %for.end.unr-lcssa ], [ %sum.0.lcssa.ph1, %for.end.epilog-lcssa ]
-; EPILOG-NO-IC-NEXT: ret i32 %sum.0.lcssa
-; EPILOG-NO-IC: for.exit2.loopexit:
-; EPILOG-NO-IC-NEXT: %retval.ph = phi i32 [ 42, %for.exiting_block ], [ %sum.02, %header ], [ %add, %for.body ], [ 42, %for.exiting_block.1 ], [ %add.1, %for.body.1 ], [ 42, %for.exiting_block.2 ], [ %add.2, %for.body.2 ], [ 42, %for.exiting_block.3 ], [ %add.3, %for.body.3 ], [ 42, %for.exiting_block.4 ], [ %add.4, %for.body.4 ], [ 42, %for.exiting_block.5 ], [ %add.5, %for.body.5 ], [ 42, %for.exiting_block.6 ], [ %add.6, %for.body.6 ], [ 42, %for.exiting_block.7 ]
-; EPILOG-NO-IC-NEXT: br label %for.exit2
-; EPILOG-NO-IC: for.exit2.loopexit2:
-; EPILOG-NO-IC-NEXT: %retval.ph3 = phi i32 [ 42, %for.exiting_block.epil ], [ %sum.02.epil, %header.epil ]
-; EPILOG-NO-IC-NEXT: br label %for.exit2
-; EPILOG-NO-IC: for.exit2:
-; EPILOG-NO-IC-NEXT: %retval = phi i32 [ %retval.ph, %for.exit2.loopexit ], [ %retval.ph3, %for.exit2.loopexit2 ]
-; EPILOG-NO-IC-NEXT: ret i32 %retval
-; EPILOG-NO-IC: for.exiting_block.1:
-; EPILOG-NO-IC-NEXT: %cmp.1 = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.1, label %for.exit2.loopexit, label %for.body.1
-; EPILOG-NO-IC: for.body.1:
-; EPILOG-NO-IC-NEXT: %arrayidx.1 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next
-; EPILOG-NO-IC-NEXT: %4 = load i32, i32* %arrayidx.1, align 4
-; EPILOG-NO-IC-NEXT: %add.1 = add nsw i32 %4, %add
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.next, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.1 = sub i64 %niter.nsub, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block.2
-; EPILOG-NO-IC: for.exiting_block.2:
-; EPILOG-NO-IC-NEXT: %cmp.2 = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.2, label %for.exit2.loopexit, label %for.body.2
-; EPILOG-NO-IC: for.body.2:
-; EPILOG-NO-IC-NEXT: %arrayidx.2 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next.1
-; EPILOG-NO-IC-NEXT: %5 = load i32, i32* %arrayidx.2, align 4
-; EPILOG-NO-IC-NEXT: %add.2 = add nsw i32 %5, %add.1
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.next.1, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.2 = sub i64 %niter.nsub.1, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block.3
-; EPILOG-NO-IC: for.exiting_block.3:
-; EPILOG-NO-IC-NEXT: %cmp.3 = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.3, label %for.exit2.loopexit, label %for.body.3
-; EPILOG-NO-IC: for.body.3:
-; EPILOG-NO-IC-NEXT: %arrayidx.3 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next.2
-; EPILOG-NO-IC-NEXT: %6 = load i32, i32* %arrayidx.3, align 4
-; EPILOG-NO-IC-NEXT: %add.3 = add nsw i32 %6, %add.2
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.next.2, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.3 = sub i64 %niter.nsub.2, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block.4
-; EPILOG-NO-IC: for.exiting_block.4:
-; EPILOG-NO-IC-NEXT: %cmp.4 = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.4, label %for.exit2.loopexit, label %for.body.4
-; EPILOG-NO-IC: for.body.4:
-; EPILOG-NO-IC-NEXT: %arrayidx.4 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next.3
-; EPILOG-NO-IC-NEXT: %7 = load i32, i32* %arrayidx.4, align 4
-; EPILOG-NO-IC-NEXT: %add.4 = add nsw i32 %7, %add.3
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv.next.3, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.4 = sub i64 %niter.nsub.3, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block.5
-; EPILOG-NO-IC: for.exiting_block.5:
-; EPILOG-NO-IC-NEXT: %cmp.5 = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.5, label %for.exit2.loopexit, label %for.body.5
-; EPILOG-NO-IC: for.body.5:
-; EPILOG-NO-IC-NEXT: %arrayidx.5 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next.4
-; EPILOG-NO-IC-NEXT: %8 = load i32, i32* %arrayidx.5, align 4
-; EPILOG-NO-IC-NEXT: %add.5 = add nsw i32 %8, %add.4
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv.next.4, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.5 = sub i64 %niter.nsub.4, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block.6
-; EPILOG-NO-IC: for.exiting_block.6:
-; EPILOG-NO-IC-NEXT: %cmp.6 = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.6, label %for.exit2.loopexit, label %for.body.6
-; EPILOG-NO-IC: for.body.6:
-; EPILOG-NO-IC-NEXT: %arrayidx.6 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next.5
-; EPILOG-NO-IC-NEXT: %9 = load i32, i32* %arrayidx.6, align 4
-; EPILOG-NO-IC-NEXT: %add.6 = add nsw i32 %9, %add.5
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv.next.5, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.6 = sub i64 %niter.nsub.5, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block.7
-; EPILOG-NO-IC: for.exiting_block.7:
-; EPILOG-NO-IC-NEXT: %cmp.7 = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.7, label %for.exit2.loopexit, label %for.body.7
-; EPILOG-NO-IC: for.body.7:
-; EPILOG-NO-IC-NEXT: %arrayidx.7 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next.6
-; EPILOG-NO-IC-NEXT: %10 = load i32, i32* %arrayidx.7, align 4
-; EPILOG-NO-IC-NEXT: %add.7 = add nsw i32 %10, %add.6
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.7 = add i64 %indvars.iv.next.6, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.7 = sub i64 %niter.nsub.6, 1
-; EPILOG-NO-IC-NEXT: %niter.ncmp.7 = icmp eq i64 %niter.nsub.7, 0
-; EPILOG-NO-IC-NEXT: br i1 %niter.ncmp.7, label %for.end.unr-lcssa.loopexit, label %header
-;
; EPILOG-LABEL: @test2(
; EPILOG-NEXT: entry:
; EPILOG-NEXT: %0 = add i64 %n, -1
@@ -1093,146 +833,6 @@ for.exit2:
; test with two exiting and three exit blocks.
; the non-latch exiting block has a switch.
define void @test3(i64 %trip, i64 %add) {
-; EPILOG-NO-IC-LABEL: @test3(
-; EPILOG-NO-IC-NEXT: entry:
-; EPILOG-NO-IC-NEXT: %0 = add i64 %trip, -1
-; EPILOG-NO-IC-NEXT: %xtraiter = and i64 %trip, 7
-; EPILOG-NO-IC-NEXT: %1 = icmp ult i64 %0, 7
-; EPILOG-NO-IC-NEXT: br i1 %1, label %exit2.loopexit.unr-lcssa, label %entry.new
-; EPILOG-NO-IC: entry.new:
-; EPILOG-NO-IC-NEXT: %unroll_iter = sub i64 %trip, %xtraiter
-; EPILOG-NO-IC-NEXT: br label %loop_header
-; EPILOG-NO-IC: loop_header:
-; EPILOG-NO-IC-NEXT: %iv = phi i64 [ 0, %entry.new ], [ %iv_next.7, %loop_latch.7 ]
-; EPILOG-NO-IC-NEXT: %sum = phi i64 [ 0, %entry.new ], [ %sum.next.7, %loop_latch.7 ]
-; EPILOG-NO-IC-NEXT: %niter = phi i64 [ %unroll_iter, %entry.new ], [ %niter.nsub.7, %loop_latch.7 ]
-; EPILOG-NO-IC-NEXT: br i1 undef, label %loop_latch, label %loop_exiting_bb1
-; EPILOG-NO-IC: loop_exiting_bb1:
-; EPILOG-NO-IC-NEXT: switch i64 %sum, label %loop_latch [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit3.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: exit3.loopexit:
-; EPILOG-NO-IC-NEXT: br label %exit3
-; EPILOG-NO-IC: exit3.loopexit2:
-; EPILOG-NO-IC-NEXT: br label %exit3
-; EPILOG-NO-IC: exit3:
-; EPILOG-NO-IC-NEXT: ret void
-; EPILOG-NO-IC: loop_latch:
-; EPILOG-NO-IC-NEXT: %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-NO-IC-NEXT: %sum.next = add i64 %sum, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub = sub i64 %niter, 1
-; EPILOG-NO-IC-NEXT: br i1 undef, label %loop_latch.1, label %loop_exiting_bb1.1
-; EPILOG-NO-IC: exit1.loopexit:
-; EPILOG-NO-IC-NEXT: br label %exit1
-; EPILOG-NO-IC: exit1.loopexit1:
-; EPILOG-NO-IC-NEXT: br label %exit1
-; EPILOG-NO-IC: exit1:
-; EPILOG-NO-IC-NEXT: ret void
-; EPILOG-NO-IC: exit2.loopexit.unr-lcssa.loopexit:
-; EPILOG-NO-IC-NEXT: %iv.unr.ph = phi i64 [ %iv_next.7, %loop_latch.7 ]
-; EPILOG-NO-IC-NEXT: %sum.unr.ph = phi i64 [ %sum.next.7, %loop_latch.7 ]
-; EPILOG-NO-IC-NEXT: br label %exit2.loopexit.unr-lcssa
-; EPILOG-NO-IC: exit2.loopexit.unr-lcssa:
-; EPILOG-NO-IC-NEXT: %iv.unr = phi i64 [ 0, %entry ], [ %iv.unr.ph, %exit2.loopexit.unr-lcssa.loopexit ]
-; EPILOG-NO-IC-NEXT: %sum.unr = phi i64 [ 0, %entry ], [ %sum.unr.ph, %exit2.loopexit.unr-lcssa.loopexit ]
-; EPILOG-NO-IC-NEXT: %lcmp.mod = icmp ne i64 %xtraiter, 0
-; EPILOG-NO-IC-NEXT: br i1 %lcmp.mod, label %loop_header.epil.preheader, label %exit2.loopexit
-; EPILOG-NO-IC: loop_header.epil.preheader:
-; EPILOG-NO-IC-NEXT: br label %loop_header.epil
-; EPILOG-NO-IC: loop_header.epil:
-; EPILOG-NO-IC-NEXT: %iv.epil = phi i64 [ %iv.unr, %loop_header.epil.preheader ], [ %iv_next.epil, %loop_latch.epil ]
-; EPILOG-NO-IC-NEXT: %sum.epil = phi i64 [ %sum.unr, %loop_header.epil.preheader ], [ %sum.next.epil, %loop_latch.epil ]
-; EPILOG-NO-IC-NEXT: %epil.iter = phi i64 [ %xtraiter, %loop_header.epil.preheader ], [ %epil.iter.sub, %loop_latch.epil ]
-; EPILOG-NO-IC-NEXT: br i1 undef, label %loop_latch.epil, label %loop_exiting_bb1.epil
-; EPILOG-NO-IC: loop_exiting_bb1.epil:
-; EPILOG-NO-IC-NEXT: switch i64 %sum.epil, label %loop_latch.epil [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit1
-; EPILOG-NO-IC-NEXT: i64 42, label %exit3.loopexit2
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.epil:
-; EPILOG-NO-IC-NEXT: %iv_next.epil = add nuw nsw i64 %iv.epil, 1
-; EPILOG-NO-IC-NEXT: %sum.next.epil = add i64 %sum.epil, %add
-; EPILOG-NO-IC-NEXT: %cmp.epil = icmp ne i64 %iv_next.epil, %trip
-; EPILOG-NO-IC-NEXT: %epil.iter.sub = sub i64 %epil.iter, 1
-; EPILOG-NO-IC-NEXT: %epil.iter.cmp = icmp ne i64 %epil.iter.sub, 0
-; EPILOG-NO-IC-NEXT: br i1 %epil.iter.cmp, label %loop_header.epil, label %exit2.loopexit.epilog-lcssa, !llvm.loop !3
-; EPILOG-NO-IC: exit2.loopexit.epilog-lcssa:
-; EPILOG-NO-IC-NEXT: br label %exit2.loopexit
-; EPILOG-NO-IC: exit2.loopexit:
-; EPILOG-NO-IC-NEXT: ret void
-; EPILOG-NO-IC: loop_exiting_bb1.1:
-; EPILOG-NO-IC-NEXT: switch i64 %sum.next, label %loop_latch.1 [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit3.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.1:
-; EPILOG-NO-IC-NEXT: %iv_next.1 = add nuw nsw i64 %iv_next, 1
-; EPILOG-NO-IC-NEXT: %sum.next.1 = add i64 %sum.next, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub.1 = sub i64 %niter.nsub, 1
-; EPILOG-NO-IC-NEXT: br i1 undef, label %loop_latch.2, label %loop_exiting_bb1.2
-; EPILOG-NO-IC: loop_exiting_bb1.2:
-; EPILOG-NO-IC-NEXT: switch i64 %sum.next.1, label %loop_latch.2 [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit3.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.2:
-; EPILOG-NO-IC-NEXT: %iv_next.2 = add nuw nsw i64 %iv_next.1, 1
-; EPILOG-NO-IC-NEXT: %sum.next.2 = add i64 %sum.next.1, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub.2 = sub i64 %niter.nsub.1, 1
-; EPILOG-NO-IC-NEXT: br i1 undef, label %loop_latch.3, label %loop_exiting_bb1.3
-; EPILOG-NO-IC: loop_exiting_bb1.3:
-; EPILOG-NO-IC-NEXT: switch i64 %sum.next.2, label %loop_latch.3 [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit3.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.3:
-; EPILOG-NO-IC-NEXT: %iv_next.3 = add nuw nsw i64 %iv_next.2, 1
-; EPILOG-NO-IC-NEXT: %sum.next.3 = add i64 %sum.next.2, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub.3 = sub i64 %niter.nsub.2, 1
-; EPILOG-NO-IC-NEXT: br i1 undef, label %loop_latch.4, label %loop_exiting_bb1.4
-; EPILOG-NO-IC: loop_exiting_bb1.4:
-; EPILOG-NO-IC-NEXT: switch i64 %sum.next.3, label %loop_latch.4 [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit3.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.4:
-; EPILOG-NO-IC-NEXT: %iv_next.4 = add nuw nsw i64 %iv_next.3, 1
-; EPILOG-NO-IC-NEXT: %sum.next.4 = add i64 %sum.next.3, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub.4 = sub i64 %niter.nsub.3, 1
-; EPILOG-NO-IC-NEXT: br i1 undef, label %loop_latch.5, label %loop_exiting_bb1.5
-; EPILOG-NO-IC: loop_exiting_bb1.5:
-; EPILOG-NO-IC-NEXT: switch i64 %sum.next.4, label %loop_latch.5 [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit3.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.5:
-; EPILOG-NO-IC-NEXT: %iv_next.5 = add nuw nsw i64 %iv_next.4, 1
-; EPILOG-NO-IC-NEXT: %sum.next.5 = add i64 %sum.next.4, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub.5 = sub i64 %niter.nsub.4, 1
-; EPILOG-NO-IC-NEXT: br i1 undef, label %loop_latch.6, label %loop_exiting_bb1.6
-; EPILOG-NO-IC: loop_exiting_bb1.6:
-; EPILOG-NO-IC-NEXT: switch i64 %sum.next.5, label %loop_latch.6 [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit3.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.6:
-; EPILOG-NO-IC-NEXT: %iv_next.6 = add nuw nsw i64 %iv_next.5, 1
-; EPILOG-NO-IC-NEXT: %sum.next.6 = add i64 %sum.next.5, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub.6 = sub i64 %niter.nsub.5, 1
-; EPILOG-NO-IC-NEXT: br i1 undef, label %loop_latch.7, label %loop_exiting_bb1.7
-; EPILOG-NO-IC: loop_exiting_bb1.7:
-; EPILOG-NO-IC-NEXT: switch i64 %sum.next.6, label %loop_latch.7 [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit3.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.7:
-; EPILOG-NO-IC-NEXT: %iv_next.7 = add nuw nsw i64 %iv_next.6, 1
-; EPILOG-NO-IC-NEXT: %sum.next.7 = add i64 %sum.next.6, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub.7 = sub i64 %niter.nsub.6, 1
-; EPILOG-NO-IC-NEXT: %niter.ncmp.7 = icmp ne i64 %niter.nsub.7, 0
-; EPILOG-NO-IC-NEXT: br i1 %niter.ncmp.7, label %loop_header, label %exit2.loopexit.unr-lcssa.loopexit
-;
; EPILOG-LABEL: @test3(
; EPILOG-NEXT: entry:
; EPILOG-NEXT: %0 = add i64 %trip, -1
@@ -1673,29 +1273,6 @@ exit2.loopexit:
; FIXME: Support multiple exiting blocks to the same latch exit block.
; Three exiting blocks where header and latch exit to same LatchExit.
define i32 @hdr_latch_same_exit(i32* nocapture %a, i64 %n, i1 %cond) {
-; EPILOG-NO-IC-LABEL: @hdr_latch_same_exit(
-; EPILOG-NO-IC-NEXT: entry:
-; EPILOG-NO-IC-NEXT: br label %header
-; EPILOG-NO-IC: header:
-; EPILOG-NO-IC-NEXT: %indvars.iv = phi i64 [ %indvars.iv.next, %latch ], [ 0, %entry ]
-; EPILOG-NO-IC-NEXT: %sum.02 = phi i32 [ %add, %latch ], [ 0, %entry ]
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %latchExit, label %for.exiting_block
-; EPILOG-NO-IC: for.exiting_block:
-; EPILOG-NO-IC-NEXT: %cmp = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp, label %for.exit2, label %latch
-; EPILOG-NO-IC: latch:
-; EPILOG-NO-IC-NEXT: %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv
-; EPILOG-NO-IC-NEXT: %0 = load i32, i32* %arrayidx, align 4
-; EPILOG-NO-IC-NEXT: %add = add nsw i32 %0, %sum.02
-; EPILOG-NO-IC-NEXT: %indvars.iv.next = add i64 %indvars.iv, 1
-; EPILOG-NO-IC-NEXT: %exitcond = icmp eq i64 %indvars.iv.next, %n
-; EPILOG-NO-IC-NEXT: br i1 %exitcond, label %latchExit, label %header
-; EPILOG-NO-IC: latchExit:
-; EPILOG-NO-IC-NEXT: %result = phi i32 [ 0, %header ], [ %add, %latch ]
-; EPILOG-NO-IC-NEXT: ret i32 %result
-; EPILOG-NO-IC: for.exit2:
-; EPILOG-NO-IC-NEXT: ret i32 42
-;
; EPILOG-LABEL: @hdr_latch_same_exit(
; EPILOG-NEXT: entry:
; EPILOG-NEXT: br label %header
@@ -1845,29 +1422,6 @@ for.exit2:
; non-header
; FIXME: We should unroll this loop.
define i32 @otherblock_latch_same_exit(i32* nocapture %a, i64 %n, i1 %cond) {
-; EPILOG-NO-IC-LABEL: @otherblock_latch_same_exit(
-; EPILOG-NO-IC-NEXT: entry:
-; EPILOG-NO-IC-NEXT: br label %header
-; EPILOG-NO-IC: header:
-; EPILOG-NO-IC-NEXT: %indvars.iv = phi i64 [ %indvars.iv.next, %latch ], [ 0, %entry ]
-; EPILOG-NO-IC-NEXT: %sum.02 = phi i32 [ %add, %latch ], [ 0, %entry ]
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %for.exit2, label %for.exiting_block
-; EPILOG-NO-IC: for.exiting_block:
-; EPILOG-NO-IC-NEXT: %cmp = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp, label %latchExit, label %latch
-; EPILOG-NO-IC: latch:
-; EPILOG-NO-IC-NEXT: %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv
-; EPILOG-NO-IC-NEXT: %0 = load i32, i32* %arrayidx, align 4
-; EPILOG-NO-IC-NEXT: %add = add nsw i32 %0, %sum.02
-; EPILOG-NO-IC-NEXT: %indvars.iv.next = add i64 %indvars.iv, 1
-; EPILOG-NO-IC-NEXT: %exitcond = icmp eq i64 %indvars.iv.next, %n
-; EPILOG-NO-IC-NEXT: br i1 %exitcond, label %latchExit, label %header
-; EPILOG-NO-IC: latchExit:
-; EPILOG-NO-IC-NEXT: %result = phi i32 [ 2, %for.exiting_block ], [ %add, %latch ]
-; EPILOG-NO-IC-NEXT: ret i32 %result
-; EPILOG-NO-IC: for.exit2:
-; EPILOG-NO-IC-NEXT: ret i32 42
-;
; EPILOG-LABEL: @otherblock_latch_same_exit(
; EPILOG-NEXT: entry:
; EPILOG-NEXT: br label %header
@@ -2018,29 +1572,6 @@ for.exit2:
; Same as above test except the incoming value for latch Phi is from the header
; FIXME: We should be able to runtime unroll.
define i32 @otherblock_latch_same_exit2(i32* nocapture %a, i64 %n, i1 %cond) {
-; EPILOG-NO-IC-LABEL: @otherblock_latch_same_exit2(
-; EPILOG-NO-IC-NEXT: entry:
-; EPILOG-NO-IC-NEXT: br label %header
-; EPILOG-NO-IC: header:
-; EPILOG-NO-IC-NEXT: %indvars.iv = phi i64 [ %indvars.iv.next, %latch ], [ 0, %entry ]
-; EPILOG-NO-IC-NEXT: %sum.02 = phi i32 [ %add, %latch ], [ 0, %entry ]
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %for.exit2, label %for.exiting_block
-; EPILOG-NO-IC: for.exiting_block:
-; EPILOG-NO-IC-NEXT: %cmp = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp, label %latchExit, label %latch
-; EPILOG-NO-IC: latch:
-; EPILOG-NO-IC-NEXT: %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv
-; EPILOG-NO-IC-NEXT: %0 = load i32, i32* %arrayidx, align 4
-; EPILOG-NO-IC-NEXT: %add = add nsw i32 %0, %sum.02
-; EPILOG-NO-IC-NEXT: %indvars.iv.next = add i64 %indvars.iv, 1
-; EPILOG-NO-IC-NEXT: %exitcond = icmp eq i64 %indvars.iv.next, %n
-; EPILOG-NO-IC-NEXT: br i1 %exitcond, label %latchExit, label %header
-; EPILOG-NO-IC: latchExit:
-; EPILOG-NO-IC-NEXT: %result = phi i32 [ %sum.02, %for.exiting_block ], [ %add, %latch ]
-; EPILOG-NO-IC-NEXT: ret i32 %result
-; EPILOG-NO-IC: for.exit2:
-; EPILOG-NO-IC-NEXT: ret i32 42
-;
; EPILOG-LABEL: @otherblock_latch_same_exit2(
; EPILOG-NEXT: entry:
; EPILOG-NEXT: br label %header
@@ -2192,29 +1723,6 @@ for.exit2:
; for.exiting_block.
; FIXME: We should be able to runtime unroll.
define i32 @otherblock_latch_same_exit3(i32* nocapture %a, i64 %n, i1 %cond) {
-; EPILOG-NO-IC-LABEL: @otherblock_latch_same_exit3(
-; EPILOG-NO-IC-NEXT: entry:
-; EPILOG-NO-IC-NEXT: br label %header
-; EPILOG-NO-IC: header:
-; EPILOG-NO-IC-NEXT: %indvars.iv = phi i64 [ %indvars.iv.next, %latch ], [ 0, %entry ]
-; EPILOG-NO-IC-NEXT: %sum.02 = phi i32 [ %add, %latch ], [ 0, %entry ]
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %for.exit2, label %for.exiting_block
-; EPILOG-NO-IC: for.exiting_block:
-; EPILOG-NO-IC-NEXT: %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv
-; EPILOG-NO-IC-NEXT: %0 = load i32, i32* %arrayidx, align 4
-; EPILOG-NO-IC-NEXT: %add = add nsw i32 %0, %sum.02
-; EPILOG-NO-IC-NEXT: %cmp = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp, label %latchExit, label %latch
-; EPILOG-NO-IC: latch:
-; EPILOG-NO-IC-NEXT: %indvars.iv.next = add i64 %indvars.iv, 1
-; EPILOG-NO-IC-NEXT: %exitcond = icmp eq i64 %indvars.iv.next, %n
-; EPILOG-NO-IC-NEXT: br i1 %exitcond, label %latchExit, label %header
-; EPILOG-NO-IC: latchExit:
-; EPILOG-NO-IC-NEXT: %result = phi i32 [ %sum.02, %for.exiting_block ], [ %add, %latch ]
-; EPILOG-NO-IC-NEXT: ret i32 %result
-; EPILOG-NO-IC: for.exit2:
-; EPILOG-NO-IC-NEXT: ret i32 42
-;
; EPILOG-LABEL: @otherblock_latch_same_exit3(
; EPILOG-NEXT: entry:
; EPILOG-NEXT: br label %header
@@ -2409,156 +1917,6 @@ returnblock: ; preds = %latchExit, %entr
; two exiting and two exit blocks.
; the non-latch exiting block has duplicate edges to the non-latch exit block.
define i64 @test5(i64 %trip, i64 %add, i1 %cond) {
-; EPILOG-NO-IC-LABEL: @test5(
-; EPILOG-NO-IC-NEXT: entry:
-; EPILOG-NO-IC-NEXT: %0 = add i64 %trip, -1
-; EPILOG-NO-IC-NEXT: %xtraiter = and i64 %trip, 7
-; EPILOG-NO-IC-NEXT: %1 = icmp ult i64 %0, 7
-; EPILOG-NO-IC-NEXT: br i1 %1, label %latchexit.unr-lcssa, label %entry.new
-; EPILOG-NO-IC: entry.new:
-; EPILOG-NO-IC-NEXT: %unroll_iter = sub i64 %trip, %xtraiter
-; EPILOG-NO-IC-NEXT: br label %loop_header
-; EPILOG-NO-IC: loop_header:
-; EPILOG-NO-IC-NEXT: %iv = phi i64 [ 0, %entry.new ], [ %iv_next.7, %loop_latch.7 ]
-; EPILOG-NO-IC-NEXT: %sum = phi i64 [ 0, %entry.new ], [ %sum.next.7, %loop_latch.7 ]
-; EPILOG-NO-IC-NEXT: %niter = phi i64 [ %unroll_iter, %entry.new ], [ %niter.nsub.7, %loop_latch.7 ]
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch, label %loop_exiting
-; EPILOG-NO-IC: loop_exiting:
-; EPILOG-NO-IC-NEXT: %ivy = add i64 %iv, %add
-; EPILOG-NO-IC-NEXT: switch i64 %sum, label %loop_latch [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch:
-; EPILOG-NO-IC-NEXT: %iv_next = add nuw nsw i64 %iv, 1
-; EPILOG-NO-IC-NEXT: %sum.next = add i64 %sum, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub = sub i64 %niter, 1
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.1, label %loop_exiting.1
-; EPILOG-NO-IC: exit1.loopexit:
-; EPILOG-NO-IC-NEXT: %result.ph = phi i64 [ %ivy, %loop_exiting ], [ %ivy, %loop_exiting ], [ %ivy.1, %loop_exiting.1 ], [ %ivy.1, %loop_exiting.1 ], [ %ivy.2, %loop_exiting.2 ], [ %ivy.2, %loop_exiting.2 ], [ %ivy.3, %loop_exiting.3 ], [ %ivy.3, %loop_exiting.3 ], [ %ivy.4, %loop_exiting.4 ], [ %ivy.4, %loop_exiting.4 ], [ %ivy.5, %loop_exiting.5 ], [ %ivy.5, %loop_exiting.5 ], [ %ivy.6, %loop_exiting.6 ], [ %ivy.6, %loop_exiting.6 ], [ %ivy.7, %loop_exiting.7 ], [ %ivy.7, %loop_exiting.7 ]
-; EPILOG-NO-IC-NEXT: br label %exit1
-; EPILOG-NO-IC: exit1.loopexit2:
-; EPILOG-NO-IC-NEXT: %result.ph3 = phi i64 [ %ivy.epil, %loop_exiting.epil ], [ %ivy.epil, %loop_exiting.epil ]
-; EPILOG-NO-IC-NEXT: br label %exit1
-; EPILOG-NO-IC: exit1:
-; EPILOG-NO-IC-NEXT: %result = phi i64 [ %result.ph, %exit1.loopexit ], [ %result.ph3, %exit1.loopexit2 ]
-; EPILOG-NO-IC-NEXT: ret i64 %result
-; EPILOG-NO-IC: latchexit.unr-lcssa.loopexit:
-; EPILOG-NO-IC-NEXT: %sum.next.lcssa.ph.ph = phi i64 [ %sum.next.7, %loop_latch.7 ]
-; EPILOG-NO-IC-NEXT: %iv.unr.ph = phi i64 [ %iv_next.7, %loop_latch.7 ]
-; EPILOG-NO-IC-NEXT: %sum.unr.ph = phi i64 [ %sum.next.7, %loop_latch.7 ]
-; EPILOG-NO-IC-NEXT: br label %latchexit.unr-lcssa
-; EPILOG-NO-IC: latchexit.unr-lcssa:
-; EPILOG-NO-IC-NEXT: %sum.next.lcssa.ph = phi i64 [ undef, %entry ], [ %sum.next.lcssa.ph.ph, %latchexit.unr-lcssa.loopexit ]
-; EPILOG-NO-IC-NEXT: %iv.unr = phi i64 [ 0, %entry ], [ %iv.unr.ph, %latchexit.unr-lcssa.loopexit ]
-; EPILOG-NO-IC-NEXT: %sum.unr = phi i64 [ 0, %entry ], [ %sum.unr.ph, %latchexit.unr-lcssa.loopexit ]
-; EPILOG-NO-IC-NEXT: %lcmp.mod = icmp ne i64 %xtraiter, 0
-; EPILOG-NO-IC-NEXT: br i1 %lcmp.mod, label %loop_header.epil.preheader, label %latchexit
-; EPILOG-NO-IC: loop_header.epil.preheader:
-; EPILOG-NO-IC-NEXT: br label %loop_header.epil
-; EPILOG-NO-IC: loop_header.epil:
-; EPILOG-NO-IC-NEXT: %iv.epil = phi i64 [ %iv.unr, %loop_header.epil.preheader ], [ %iv_next.epil, %loop_latch.epil ]
-; EPILOG-NO-IC-NEXT: %sum.epil = phi i64 [ %sum.unr, %loop_header.epil.preheader ], [ %sum.next.epil, %loop_latch.epil ]
-; EPILOG-NO-IC-NEXT: %epil.iter = phi i64 [ %xtraiter, %loop_header.epil.preheader ], [ %epil.iter.sub, %loop_latch.epil ]
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.epil, label %loop_exiting.epil
-; EPILOG-NO-IC: loop_exiting.epil:
-; EPILOG-NO-IC-NEXT: %ivy.epil = add i64 %iv.epil, %add
-; EPILOG-NO-IC-NEXT: switch i64 %sum.epil, label %loop_latch.epil [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit2
-; EPILOG-NO-IC-NEXT: i64 42, label %exit1.loopexit2
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.epil:
-; EPILOG-NO-IC-NEXT: %iv_next.epil = add nuw nsw i64 %iv.epil, 1
-; EPILOG-NO-IC-NEXT: %sum.next.epil = add i64 %sum.epil, %add
-; EPILOG-NO-IC-NEXT: %cmp.epil = icmp ne i64 %iv_next.epil, %trip
-; EPILOG-NO-IC-NEXT: %epil.iter.sub = sub i64 %epil.iter, 1
-; EPILOG-NO-IC-NEXT: %epil.iter.cmp = icmp ne i64 %epil.iter.sub, 0
-; EPILOG-NO-IC-NEXT: br i1 %epil.iter.cmp, label %loop_header.epil, label %latchexit.epilog-lcssa, !llvm.loop !4
-; EPILOG-NO-IC: latchexit.epilog-lcssa:
-; EPILOG-NO-IC-NEXT: %sum.next.lcssa.ph1 = phi i64 [ %sum.next.epil, %loop_latch.epil ]
-; EPILOG-NO-IC-NEXT: br label %latchexit
-; EPILOG-NO-IC: latchexit:
-; EPILOG-NO-IC-NEXT: %sum.next.lcssa = phi i64 [ %sum.next.lcssa.ph, %latchexit.unr-lcssa ], [ %sum.next.lcssa.ph1, %latchexit.epilog-lcssa ]
-; EPILOG-NO-IC-NEXT: ret i64 %sum.next.lcssa
-; EPILOG-NO-IC: loop_exiting.1:
-; EPILOG-NO-IC-NEXT: %ivy.1 = add i64 %iv_next, %add
-; EPILOG-NO-IC-NEXT: switch i64 %sum.next, label %loop_latch.1 [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.1:
-; EPILOG-NO-IC-NEXT: %iv_next.1 = add nuw nsw i64 %iv_next, 1
-; EPILOG-NO-IC-NEXT: %sum.next.1 = add i64 %sum.next, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub.1 = sub i64 %niter.nsub, 1
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.2, label %loop_exiting.2
-; EPILOG-NO-IC: loop_exiting.2:
-; EPILOG-NO-IC-NEXT: %ivy.2 = add i64 %iv_next.1, %add
-; EPILOG-NO-IC-NEXT: switch i64 %sum.next.1, label %loop_latch.2 [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.2:
-; EPILOG-NO-IC-NEXT: %iv_next.2 = add nuw nsw i64 %iv_next.1, 1
-; EPILOG-NO-IC-NEXT: %sum.next.2 = add i64 %sum.next.1, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub.2 = sub i64 %niter.nsub.1, 1
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.3, label %loop_exiting.3
-; EPILOG-NO-IC: loop_exiting.3:
-; EPILOG-NO-IC-NEXT: %ivy.3 = add i64 %iv_next.2, %add
-; EPILOG-NO-IC-NEXT: switch i64 %sum.next.2, label %loop_latch.3 [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.3:
-; EPILOG-NO-IC-NEXT: %iv_next.3 = add nuw nsw i64 %iv_next.2, 1
-; EPILOG-NO-IC-NEXT: %sum.next.3 = add i64 %sum.next.2, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub.3 = sub i64 %niter.nsub.2, 1
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.4, label %loop_exiting.4
-; EPILOG-NO-IC: loop_exiting.4:
-; EPILOG-NO-IC-NEXT: %ivy.4 = add i64 %iv_next.3, %add
-; EPILOG-NO-IC-NEXT: switch i64 %sum.next.3, label %loop_latch.4 [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.4:
-; EPILOG-NO-IC-NEXT: %iv_next.4 = add nuw nsw i64 %iv_next.3, 1
-; EPILOG-NO-IC-NEXT: %sum.next.4 = add i64 %sum.next.3, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub.4 = sub i64 %niter.nsub.3, 1
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.5, label %loop_exiting.5
-; EPILOG-NO-IC: loop_exiting.5:
-; EPILOG-NO-IC-NEXT: %ivy.5 = add i64 %iv_next.4, %add
-; EPILOG-NO-IC-NEXT: switch i64 %sum.next.4, label %loop_latch.5 [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.5:
-; EPILOG-NO-IC-NEXT: %iv_next.5 = add nuw nsw i64 %iv_next.4, 1
-; EPILOG-NO-IC-NEXT: %sum.next.5 = add i64 %sum.next.4, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub.5 = sub i64 %niter.nsub.4, 1
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.6, label %loop_exiting.6
-; EPILOG-NO-IC: loop_exiting.6:
-; EPILOG-NO-IC-NEXT: %ivy.6 = add i64 %iv_next.5, %add
-; EPILOG-NO-IC-NEXT: switch i64 %sum.next.5, label %loop_latch.6 [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.6:
-; EPILOG-NO-IC-NEXT: %iv_next.6 = add nuw nsw i64 %iv_next.5, 1
-; EPILOG-NO-IC-NEXT: %sum.next.6 = add i64 %sum.next.5, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub.6 = sub i64 %niter.nsub.5, 1
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %loop_latch.7, label %loop_exiting.7
-; EPILOG-NO-IC: loop_exiting.7:
-; EPILOG-NO-IC-NEXT: %ivy.7 = add i64 %iv_next.6, %add
-; EPILOG-NO-IC-NEXT: switch i64 %sum.next.6, label %loop_latch.7 [
-; EPILOG-NO-IC-NEXT: i64 24, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: i64 42, label %exit1.loopexit
-; EPILOG-NO-IC-NEXT: ]
-; EPILOG-NO-IC: loop_latch.7:
-; EPILOG-NO-IC-NEXT: %iv_next.7 = add nuw nsw i64 %iv_next.6, 1
-; EPILOG-NO-IC-NEXT: %sum.next.7 = add i64 %sum.next.6, %add
-; EPILOG-NO-IC-NEXT: %niter.nsub.7 = sub i64 %niter.nsub.6, 1
-; EPILOG-NO-IC-NEXT: %niter.ncmp.7 = icmp ne i64 %niter.nsub.7, 0
-; EPILOG-NO-IC-NEXT: br i1 %niter.ncmp.7, label %loop_header, label %latchexit.unr-lcssa.loopexit
-;
; EPILOG-LABEL: @test5(
; EPILOG-NEXT: entry:
; EPILOG-NEXT: %0 = add i64 %trip, -1
@@ -3025,152 +2383,6 @@ latchexit:
; test when exit blocks have successors.
define i32 @test6(i32* nocapture %a, i64 %n, i1 %cond, i32 %x) {
-; EPILOG-NO-IC-LABEL: @test6(
-; EPILOG-NO-IC-NEXT: entry:
-; EPILOG-NO-IC-NEXT: %0 = add i64 %n, -1
-; EPILOG-NO-IC-NEXT: %xtraiter = and i64 %n, 7
-; EPILOG-NO-IC-NEXT: %1 = icmp ult i64 %0, 7
-; EPILOG-NO-IC-NEXT: br i1 %1, label %latch_exit.unr-lcssa, label %entry.new
-; EPILOG-NO-IC: entry.new:
-; EPILOG-NO-IC-NEXT: %unroll_iter = sub i64 %n, %xtraiter
-; EPILOG-NO-IC-NEXT: br label %header
-; EPILOG-NO-IC: header:
-; EPILOG-NO-IC-NEXT: %indvars.iv = phi i64 [ 0, %entry.new ], [ %indvars.iv.next.7, %latch.7 ]
-; EPILOG-NO-IC-NEXT: %sum.02 = phi i32 [ 0, %entry.new ], [ %add.7, %latch.7 ]
-; EPILOG-NO-IC-NEXT: %niter = phi i64 [ %unroll_iter, %entry.new ], [ %niter.nsub.7, %latch.7 ]
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block
-; EPILOG-NO-IC: for.exiting_block:
-; EPILOG-NO-IC-NEXT: %cmp = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp, label %for.exit2.loopexit, label %latch
-; EPILOG-NO-IC: latch:
-; EPILOG-NO-IC-NEXT: %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv
-; EPILOG-NO-IC-NEXT: %load = load i32, i32* %arrayidx, align 4
-; EPILOG-NO-IC-NEXT: %add = add nsw i32 %load, %sum.02
-; EPILOG-NO-IC-NEXT: %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub = sub i64 %niter, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block.1
-; EPILOG-NO-IC: latch_exit.unr-lcssa.loopexit:
-; EPILOG-NO-IC-NEXT: %sum.0.lcssa.ph.ph = phi i32 [ %add.7, %latch.7 ]
-; EPILOG-NO-IC-NEXT: %indvars.iv.unr.ph = phi i64 [ %indvars.iv.next.7, %latch.7 ]
-; EPILOG-NO-IC-NEXT: %sum.02.unr.ph = phi i32 [ %add.7, %latch.7 ]
-; EPILOG-NO-IC-NEXT: br label %latch_exit.unr-lcssa
-; EPILOG-NO-IC: latch_exit.unr-lcssa:
-; EPILOG-NO-IC-NEXT: %sum.0.lcssa.ph = phi i32 [ undef, %entry ], [ %sum.0.lcssa.ph.ph, %latch_exit.unr-lcssa.loopexit ]
-; EPILOG-NO-IC-NEXT: %indvars.iv.unr = phi i64 [ 0, %entry ], [ %indvars.iv.unr.ph, %latch_exit.unr-lcssa.loopexit ]
-; EPILOG-NO-IC-NEXT: %sum.02.unr = phi i32 [ 0, %entry ], [ %sum.02.unr.ph, %latch_exit.unr-lcssa.loopexit ]
-; EPILOG-NO-IC-NEXT: %lcmp.mod = icmp ne i64 %xtraiter, 0
-; EPILOG-NO-IC-NEXT: br i1 %lcmp.mod, label %header.epil.preheader, label %latch_exit
-; EPILOG-NO-IC: header.epil.preheader:
-; EPILOG-NO-IC-NEXT: br label %header.epil
-; EPILOG-NO-IC: header.epil:
-; EPILOG-NO-IC-NEXT: %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %latch.epil ], [ %indvars.iv.unr, %header.epil.preheader ]
-; EPILOG-NO-IC-NEXT: %sum.02.epil = phi i32 [ %add.epil, %latch.epil ], [ %sum.02.unr, %header.epil.preheader ]
-; EPILOG-NO-IC-NEXT: %epil.iter = phi i64 [ %xtraiter, %header.epil.preheader ], [ %epil.iter.sub, %latch.epil ]
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit2, label %for.exiting_block.epil
-; EPILOG-NO-IC: for.exiting_block.epil:
-; EPILOG-NO-IC-NEXT: %cmp.epil = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.epil, label %for.exit2.loopexit2, label %latch.epil
-; EPILOG-NO-IC: latch.epil:
-; EPILOG-NO-IC-NEXT: %arrayidx.epil = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.epil
-; EPILOG-NO-IC-NEXT: %load.epil = load i32, i32* %arrayidx.epil, align 4
-; EPILOG-NO-IC-NEXT: %add.epil = add nsw i32 %load.epil, %sum.02.epil
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.epil = add i64 %indvars.iv.epil, 1
-; EPILOG-NO-IC-NEXT: %exitcond.epil = icmp eq i64 %indvars.iv.next.epil, %n
-; EPILOG-NO-IC-NEXT: %epil.iter.sub = sub i64 %epil.iter, 1
-; EPILOG-NO-IC-NEXT: %epil.iter.cmp = icmp ne i64 %epil.iter.sub, 0
-; EPILOG-NO-IC-NEXT: br i1 %epil.iter.cmp, label %header.epil, label %latch_exit.epilog-lcssa, !llvm.loop !5
-; EPILOG-NO-IC: latch_exit.epilog-lcssa:
-; EPILOG-NO-IC-NEXT: %sum.0.lcssa.ph1 = phi i32 [ %add.epil, %latch.epil ]
-; EPILOG-NO-IC-NEXT: br label %latch_exit
-; EPILOG-NO-IC: latch_exit:
-; EPILOG-NO-IC-NEXT: %sum.0.lcssa = phi i32 [ %sum.0.lcssa.ph, %latch_exit.unr-lcssa ], [ %sum.0.lcssa.ph1, %latch_exit.epilog-lcssa ]
-; EPILOG-NO-IC-NEXT: ret i32 %sum.0.lcssa
-; EPILOG-NO-IC: for.exit2.loopexit:
-; EPILOG-NO-IC-NEXT: %retval.ph = phi i32 [ 42, %for.exiting_block ], [ %sum.02, %header ], [ %add, %latch ], [ 42, %for.exiting_block.1 ], [ %add.1, %latch.1 ], [ 42, %for.exiting_block.2 ], [ %add.2, %latch.2 ], [ 42, %for.exiting_block.3 ], [ %add.3, %latch.3 ], [ 42, %for.exiting_block.4 ], [ %add.4, %latch.4 ], [ 42, %for.exiting_block.5 ], [ %add.5, %latch.5 ], [ 42, %for.exiting_block.6 ], [ %add.6, %latch.6 ], [ 42, %for.exiting_block.7 ]
-; EPILOG-NO-IC-NEXT: br label %for.exit2
-; EPILOG-NO-IC: for.exit2.loopexit2:
-; EPILOG-NO-IC-NEXT: %retval.ph3 = phi i32 [ 42, %for.exiting_block.epil ], [ %sum.02.epil, %header.epil ]
-; EPILOG-NO-IC-NEXT: br label %for.exit2
-; EPILOG-NO-IC: for.exit2:
-; EPILOG-NO-IC-NEXT: %retval = phi i32 [ %retval.ph, %for.exit2.loopexit ], [ %retval.ph3, %for.exit2.loopexit2 ]
-; EPILOG-NO-IC-NEXT: %addx = add i32 %retval, %x
-; EPILOG-NO-IC-NEXT: br i1 %cond, label %exit_true, label %exit_false
-; EPILOG-NO-IC: exit_true:
-; EPILOG-NO-IC-NEXT: ret i32 %retval
-; EPILOG-NO-IC: exit_false:
-; EPILOG-NO-IC-NEXT: ret i32 %addx
-; EPILOG-NO-IC: for.exiting_block.1:
-; EPILOG-NO-IC-NEXT: %cmp.1 = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.1, label %for.exit2.loopexit, label %latch.1
-; EPILOG-NO-IC: latch.1:
-; EPILOG-NO-IC-NEXT: %arrayidx.1 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next
-; EPILOG-NO-IC-NEXT: %load.1 = load i32, i32* %arrayidx.1, align 4
-; EPILOG-NO-IC-NEXT: %add.1 = add nsw i32 %load.1, %add
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.next, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.1 = sub i64 %niter.nsub, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block.2
-; EPILOG-NO-IC: for.exiting_block.2:
-; EPILOG-NO-IC-NEXT: %cmp.2 = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.2, label %for.exit2.loopexit, label %latch.2
-; EPILOG-NO-IC: latch.2:
-; EPILOG-NO-IC-NEXT: %arrayidx.2 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next.1
-; EPILOG-NO-IC-NEXT: %load.2 = load i32, i32* %arrayidx.2, align 4
-; EPILOG-NO-IC-NEXT: %add.2 = add nsw i32 %load.2, %add.1
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.next.1, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.2 = sub i64 %niter.nsub.1, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block.3
-; EPILOG-NO-IC: for.exiting_block.3:
-; EPILOG-NO-IC-NEXT: %cmp.3 = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.3, label %for.exit2.loopexit, label %latch.3
-; EPILOG-NO-IC: latch.3:
-; EPILOG-NO-IC-NEXT: %arrayidx.3 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next.2
-; EPILOG-NO-IC-NEXT: %load.3 = load i32, i32* %arrayidx.3, align 4
-; EPILOG-NO-IC-NEXT: %add.3 = add nsw i32 %load.3, %add.2
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.next.2, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.3 = sub i64 %niter.nsub.2, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block.4
-; EPILOG-NO-IC: for.exiting_block.4:
-; EPILOG-NO-IC-NEXT: %cmp.4 = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.4, label %for.exit2.loopexit, label %latch.4
-; EPILOG-NO-IC: latch.4:
-; EPILOG-NO-IC-NEXT: %arrayidx.4 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next.3
-; EPILOG-NO-IC-NEXT: %load.4 = load i32, i32* %arrayidx.4, align 4
-; EPILOG-NO-IC-NEXT: %add.4 = add nsw i32 %load.4, %add.3
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv.next.3, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.4 = sub i64 %niter.nsub.3, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block.5
-; EPILOG-NO-IC: for.exiting_block.5:
-; EPILOG-NO-IC-NEXT: %cmp.5 = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.5, label %for.exit2.loopexit, label %latch.5
-; EPILOG-NO-IC: latch.5:
-; EPILOG-NO-IC-NEXT: %arrayidx.5 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next.4
-; EPILOG-NO-IC-NEXT: %load.5 = load i32, i32* %arrayidx.5, align 4
-; EPILOG-NO-IC-NEXT: %add.5 = add nsw i32 %load.5, %add.4
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv.next.4, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.5 = sub i64 %niter.nsub.4, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block.6
-; EPILOG-NO-IC: for.exiting_block.6:
-; EPILOG-NO-IC-NEXT: %cmp.6 = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.6, label %for.exit2.loopexit, label %latch.6
-; EPILOG-NO-IC: latch.6:
-; EPILOG-NO-IC-NEXT: %arrayidx.6 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next.5
-; EPILOG-NO-IC-NEXT: %load.6 = load i32, i32* %arrayidx.6, align 4
-; EPILOG-NO-IC-NEXT: %add.6 = add nsw i32 %load.6, %add.5
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv.next.5, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.6 = sub i64 %niter.nsub.5, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %for.exit2.loopexit, label %for.exiting_block.7
-; EPILOG-NO-IC: for.exiting_block.7:
-; EPILOG-NO-IC-NEXT: %cmp.7 = icmp eq i64 %n, 42
-; EPILOG-NO-IC-NEXT: br i1 %cmp.7, label %for.exit2.loopexit, label %latch.7
-; EPILOG-NO-IC: latch.7:
-; EPILOG-NO-IC-NEXT: %arrayidx.7 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv.next.6
-; EPILOG-NO-IC-NEXT: %load.7 = load i32, i32* %arrayidx.7, align 4
-; EPILOG-NO-IC-NEXT: %add.7 = add nsw i32 %load.7, %add.6
-; EPILOG-NO-IC-NEXT: %indvars.iv.next.7 = add i64 %indvars.iv.next.6, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.7 = sub i64 %niter.nsub.6, 1
-; EPILOG-NO-IC-NEXT: %niter.ncmp.7 = icmp eq i64 %niter.nsub.7, 0
-; EPILOG-NO-IC-NEXT: br i1 %niter.ncmp.7, label %latch_exit.unr-lcssa.loopexit, label %header
-;
; EPILOG-LABEL: @test6(
; EPILOG-NEXT: entry:
; EPILOG-NEXT: %0 = add i64 %n, -1
@@ -3640,93 +2852,6 @@ exit_false:
; test when value in exit block does not have VMap.
define i32 @test7(i32 %arg, i32 %arg1, i32 %arg2) {
-; EPILOG-NO-IC-LABEL: @test7(
-; EPILOG-NO-IC-NEXT: bb:
-; EPILOG-NO-IC-NEXT: %i = icmp slt i32 undef, 2
-; EPILOG-NO-IC-NEXT: %sext = sext i32 undef to i64
-; EPILOG-NO-IC-NEXT: %shft = ashr exact i32 %arg, 16
-; EPILOG-NO-IC-NEXT: br i1 %i, label %loopexit2, label %preheader
-; EPILOG-NO-IC: preheader:
-; EPILOG-NO-IC-NEXT: %0 = add nsw i64 %sext, -1
-; EPILOG-NO-IC-NEXT: %1 = add nsw i64 %sext, -2
-; EPILOG-NO-IC-NEXT: %xtraiter = and i64 %0, 7
-; EPILOG-NO-IC-NEXT: %2 = icmp ult i64 %1, 7
-; EPILOG-NO-IC-NEXT: br i1 %2, label %latchexit.unr-lcssa, label %preheader.new
-; EPILOG-NO-IC: preheader.new:
-; EPILOG-NO-IC-NEXT: %unroll_iter = sub i64 %0, %xtraiter
-; EPILOG-NO-IC-NEXT: br label %header
-; EPILOG-NO-IC: header:
-; EPILOG-NO-IC-NEXT: %i6 = phi i64 [ 1, %preheader.new ], [ %add.7, %latch.7 ]
-; EPILOG-NO-IC-NEXT: %niter = phi i64 [ %unroll_iter, %preheader.new ], [ %niter.nsub.7, %latch.7 ]
-; EPILOG-NO-IC-NEXT: br i1 false, label %loopexit1.loopexit, label %latch
-; EPILOG-NO-IC: latch:
-; EPILOG-NO-IC-NEXT: %add = add nuw nsw i64 %i6, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub = sub i64 %niter, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %loopexit1.loopexit, label %latch.1
-; EPILOG-NO-IC: latchexit.unr-lcssa.loopexit:
-; EPILOG-NO-IC-NEXT: %i6.unr.ph = phi i64 [ %add.7, %latch.7 ]
-; EPILOG-NO-IC-NEXT: br label %latchexit.unr-lcssa
-; EPILOG-NO-IC: latchexit.unr-lcssa:
-; EPILOG-NO-IC-NEXT: %i6.unr = phi i64 [ 1, %preheader ], [ %i6.unr.ph, %latchexit.unr-lcssa.loopexit ]
-; EPILOG-NO-IC-NEXT: %lcmp.mod = icmp ne i64 %xtraiter, 0
-; EPILOG-NO-IC-NEXT: br i1 %lcmp.mod, label %header.epil.preheader, label %latchexit
-; EPILOG-NO-IC: header.epil.preheader:
-; EPILOG-NO-IC-NEXT: br label %header.epil
-; EPILOG-NO-IC: header.epil:
-; EPILOG-NO-IC-NEXT: %i6.epil = phi i64 [ %i6.unr, %header.epil.preheader ], [ %add.epil, %latch.epil ]
-; EPILOG-NO-IC-NEXT: %epil.iter = phi i64 [ %xtraiter, %header.epil.preheader ], [ %epil.iter.sub, %latch.epil ]
-; EPILOG-NO-IC-NEXT: br i1 false, label %loopexit1.loopexit1, label %latch.epil
-; EPILOG-NO-IC: latch.epil:
-; EPILOG-NO-IC-NEXT: %add.epil = add nuw nsw i64 %i6.epil, 1
-; EPILOG-NO-IC-NEXT: %i9.epil = icmp slt i64 %add.epil, %sext
-; EPILOG-NO-IC-NEXT: %epil.iter.sub = sub i64 %epil.iter, 1
-; EPILOG-NO-IC-NEXT: %epil.iter.cmp = icmp ne i64 %epil.iter.sub, 0
-; EPILOG-NO-IC-NEXT: br i1 %epil.iter.cmp, label %header.epil, label %latchexit.epilog-lcssa, !llvm.loop !6
-; EPILOG-NO-IC: latchexit.epilog-lcssa:
-; EPILOG-NO-IC-NEXT: br label %latchexit
-; EPILOG-NO-IC: latchexit:
-; EPILOG-NO-IC-NEXT: unreachable
-; EPILOG-NO-IC: loopexit2:
-; EPILOG-NO-IC-NEXT: ret i32 %shft
-; EPILOG-NO-IC: loopexit1.loopexit:
-; EPILOG-NO-IC-NEXT: %sext3.ph = phi i32 [ %shft, %header ], [ %shft, %latch ], [ %shft, %latch.1 ], [ %shft, %latch.2 ], [ %shft, %latch.3 ], [ %shft, %latch.4 ], [ %shft, %latch.5 ], [ %shft, %latch.6 ]
-; EPILOG-NO-IC-NEXT: br label %loopexit1
-; EPILOG-NO-IC: loopexit1.loopexit1:
-; EPILOG-NO-IC-NEXT: %sext3.ph2 = phi i32 [ %shft, %header.epil ]
-; EPILOG-NO-IC-NEXT: br label %loopexit1
-; EPILOG-NO-IC: loopexit1:
-; EPILOG-NO-IC-NEXT: %sext3 = phi i32 [ %sext3.ph, %loopexit1.loopexit ], [ %sext3.ph2, %loopexit1.loopexit1 ]
-; EPILOG-NO-IC-NEXT: ret i32 %sext3
-; EPILOG-NO-IC: latch.1:
-; EPILOG-NO-IC-NEXT: %add.1 = add nuw nsw i64 %add, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.1 = sub i64 %niter.nsub, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %loopexit1.loopexit, label %latch.2
-; EPILOG-NO-IC: latch.2:
-; EPILOG-NO-IC-NEXT: %add.2 = add nuw nsw i64 %add.1, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.2 = sub i64 %niter.nsub.1, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %loopexit1.loopexit, label %latch.3
-; EPILOG-NO-IC: latch.3:
-; EPILOG-NO-IC-NEXT: %add.3 = add nuw nsw i64 %add.2, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.3 = sub i64 %niter.nsub.2, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %loopexit1.loopexit, label %latch.4
-; EPILOG-NO-IC: latch.4:
-; EPILOG-NO-IC-NEXT: %add.4 = add nuw nsw i64 %add.3, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.4 = sub i64 %niter.nsub.3, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %loopexit1.loopexit, label %latch.5
-; EPILOG-NO-IC: latch.5:
-; EPILOG-NO-IC-NEXT: %add.5 = add nuw nsw i64 %add.4, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.5 = sub i64 %niter.nsub.4, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %loopexit1.loopexit, label %latch.6
-; EPILOG-NO-IC: latch.6:
-; EPILOG-NO-IC-NEXT: %add.6 = add nuw nsw i64 %add.5, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.6 = sub i64 %niter.nsub.5, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %loopexit1.loopexit, label %latch.7
-; EPILOG-NO-IC: latch.7:
-; EPILOG-NO-IC-NEXT: %add.7 = add nuw nsw i64 %add.6, 1
-; EPILOG-NO-IC-NEXT: %niter.nsub.7 = sub i64 %niter.nsub.6, 1
-; EPILOG-NO-IC-NEXT: %niter.ncmp.7 = icmp ne i64 %niter.nsub.7, 0
-; EPILOG-NO-IC-NEXT: br i1 %niter.ncmp.7, label %header, label %latchexit.unr-lcssa.loopexit
-;
; EPILOG-LABEL: @test7(
; EPILOG-NEXT: bb:
; EPILOG-NEXT: %i = icmp slt i32 undef, 2
@@ -4036,24 +3161,6 @@ loopexit1: ; preds = %header
; The outer loop header is the preheader for the inner loop and the inner header
; branches back to the outer loop.
define void @test8() {
-; EPILOG-NO-IC-LABEL: @test8(
-; EPILOG-NO-IC-NEXT: bb:
-; EPILOG-NO-IC-NEXT: br label %outerloop
-; EPILOG-NO-IC: outerloop.loopexit:
-; EPILOG-NO-IC-NEXT: br label %outerloop
-; EPILOG-NO-IC: outerloop:
-; EPILOG-NO-IC-NEXT: %i = phi i64 [ 3, %bb ], [ 0, %outerloop.loopexit ]
-; EPILOG-NO-IC-NEXT: br label %innerH
-; EPILOG-NO-IC: innerH:
-; EPILOG-NO-IC-NEXT: %i3 = phi i64 [ %i4, %latch ], [ %i, %outerloop ]
-; EPILOG-NO-IC-NEXT: %i4 = add nuw nsw i64 %i3, 1
-; EPILOG-NO-IC-NEXT: br i1 false, label %outerloop.loopexit, label %latch
-; EPILOG-NO-IC: latch:
-; EPILOG-NO-IC-NEXT: %i6 = icmp ult i64 %i4, 100
-; EPILOG-NO-IC-NEXT: br i1 %i6, label %innerH, label %exit
-; EPILOG-NO-IC: exit:
-; EPILOG-NO-IC-NEXT: ret void
-;
; EPILOG-LABEL: @test8(
; EPILOG-NEXT: bb:
; EPILOG-NEXT: br label %outerloop
@@ -4290,34 +3397,6 @@ declare i8 addrspace(1)* @foo(i32)
; a value from outer loop is used in exit block of inner loop.
; Don't create VMap entries for such values (%trip).
define i8 addrspace(1)* @test9(i8* nocapture readonly %arg, i32 %n) {
-; EPILOG-NO-IC-LABEL: @test9(
-; EPILOG-NO-IC-NEXT: bb:
-; EPILOG-NO-IC-NEXT: br label %outerloopHdr
-; EPILOG-NO-IC: outerloopHdr:
-; EPILOG-NO-IC-NEXT: %trip = add i32 %n, -1
-; EPILOG-NO-IC-NEXT: %outercnd = icmp slt i32 0, %trip
-; EPILOG-NO-IC-NEXT: br i1 %outercnd, label %preheader, label %outerLatch
-; EPILOG-NO-IC: preheader:
-; EPILOG-NO-IC-NEXT: %i4 = zext i32 0 to i64
-; EPILOG-NO-IC-NEXT: br label %header
-; EPILOG-NO-IC: header:
-; EPILOG-NO-IC-NEXT: %phi = phi i64 [ %i4, %preheader ], [ %iv.next, %latch ]
-; EPILOG-NO-IC-NEXT: %i7 = trunc i64 %phi to i32
-; EPILOG-NO-IC-NEXT: br i1 true, label %latch, label %innerexit
-; EPILOG-NO-IC: innerexit:
-; EPILOG-NO-IC-NEXT: %trip.lcssa = phi i32 [ %trip, %header ]
-; EPILOG-NO-IC-NEXT: %i9 = call i8 addrspace(1)* @foo(i32 %trip.lcssa)
-; EPILOG-NO-IC-NEXT: ret i8 addrspace(1)* %i9
-; EPILOG-NO-IC: latch:
-; EPILOG-NO-IC-NEXT: %i11 = add nsw i32 %i7, 1
-; EPILOG-NO-IC-NEXT: %innercnd = icmp slt i32 %i11, %trip
-; EPILOG-NO-IC-NEXT: %iv.next = add nuw nsw i64 %phi, 1
-; EPILOG-NO-IC-NEXT: br i1 %innercnd, label %header, label %outerLatch.loopexit
-; EPILOG-NO-IC: outerLatch.loopexit:
-; EPILOG-NO-IC-NEXT: br label %outerLatch
-; EPILOG-NO-IC: outerLatch:
-; EPILOG-NO-IC-NEXT: br label %outerloopHdr
-;
; EPILOG-LABEL: @test9(
; EPILOG-NEXT: bb:
; EPILOG-NEXT: br label %outerloopHdr
More information about the llvm-commits
mailing list