Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Unified Diff: test/Transforms/LoopUnroll/scevunroll.ll

Issue 183273009: Prep for merging 3.4: Undo changes from 3.3 branch (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Retry Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/Transforms/InstCombine/add4.ll ('k') | test/Transforms/LoopUnroll/unloop.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Transforms/LoopUnroll/scevunroll.ll
diff --git a/test/Transforms/LoopUnroll/scevunroll.ll b/test/Transforms/LoopUnroll/scevunroll.ll
index 308a0363165c96ffec019e9d9cc7a02aaf01bf43..99b3a7d861971e323f6c8ae3da5f21f6316f1d3e 100644
--- a/test/Transforms/LoopUnroll/scevunroll.ll
+++ b/test/Transforms/LoopUnroll/scevunroll.ll
@@ -66,16 +66,13 @@ exit2:
; SCEV properly unrolls multi-exit loops.
;
-; SCEV cannot currently unroll this loop.
-; It should ideally detect a trip count of 5.
-; rdar:14038809 [SCEV]: Optimize trip count computation for multi-exit loops.
; CHECK: @multiExit
-; CHECKFIXME: getelementptr i32* %base, i32 10
-; CHECKFIXME-NEXT: load i32*
-; CHECKFIXME: br i1 false, label %l2.10, label %exit1
-; CHECKFIXME: l2.10:
-; CHECKFIXME-NOT: br
-; CHECKFIXME: ret i32
+; CHECK: getelementptr i32* %base, i32 10
+; CHECK-NEXT: load i32*
+; CHECK: br i1 false, label %l2.10, label %exit1
+; CHECK: l2.10:
+; CHECK-NOT: br
+; CHECK: ret i32
define i32 @multiExit(i32* %base) nounwind {
entry:
br label %l1
@@ -173,38 +170,3 @@ for.body87:
br label %for.body87
}
-; PR16130: clang produces incorrect code with loop/expression at -O2
-; rdar:14036816 loop-unroll makes assumptions about undefined behavior
-;
-; The loop latch is assumed to exit after the first iteration because
-; of the induction variable's NSW flag. However, the loop latch's
-; equality test is skipped and the loop exits after the second
-; iteration via the early exit. So loop unrolling cannot assume that
-; the loop latch's exit count of zero is an upper bound on the number
-; of iterations.
-;
-; CHECK: @nsw_latch
-; CHECK: for.body:
-; CHECK: %b.03 = phi i32 [ 0, %entry ], [ %add, %for.cond ]
-; CHECK: return:
-; CHECK: %b.03.lcssa = phi i32 [ %b.03, %for.body ], [ %b.03, %for.cond ]
-define void @nsw_latch(i32* %a) nounwind {
-entry:
- br label %for.body
-
-for.body: ; preds = %for.cond, %entry
- %b.03 = phi i32 [ 0, %entry ], [ %add, %for.cond ]
- %tobool = icmp eq i32 %b.03, 0
- %add = add nsw i32 %b.03, 8
- br i1 %tobool, label %for.cond, label %return
-
-for.cond: ; preds = %for.body
- %cmp = icmp eq i32 %add, 13
- br i1 %cmp, label %return, label %for.body
-
-return: ; preds = %for.body, %for.cond
- %b.03.lcssa = phi i32 [ %b.03, %for.body ], [ %b.03, %for.cond ]
- %retval.0 = phi i32 [ 1, %for.body ], [ 0, %for.cond ]
- store i32 %b.03.lcssa, i32* %a, align 4
- ret void
-}
« no previous file with comments | « test/Transforms/InstCombine/add4.ll ('k') | test/Transforms/LoopUnroll/unloop.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698