summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/ScalarEvolution/trip-count10.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Analysis/ScalarEvolution/trip-count10.ll')
-rw-r--r--llvm/test/Analysis/ScalarEvolution/trip-count10.ll78
1 files changed, 50 insertions, 28 deletions
diff --git a/llvm/test/Analysis/ScalarEvolution/trip-count10.ll b/llvm/test/Analysis/ScalarEvolution/trip-count10.ll
index ead80b95040..5540e3e6a2d 100644
--- a/llvm/test/Analysis/ScalarEvolution/trip-count10.ll
+++ b/llvm/test/Analysis/ScalarEvolution/trip-count10.ll
@@ -1,24 +1,15 @@
-; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
+; RUN: opt < %s -analyze -scalar-evolution -scalar-evolution-classify-expressions=0 | FileCheck %s
; Trip counts with trivial exit conditions.
-; CHECK: Determining loop execution counts for: @a
-; CHECK: Loop %loop: Unpredictable backedge-taken count.
-; CHECK: Loop %loop: Unpredictable max backedge-taken count.
-
-; CHECK: Determining loop execution counts for: @b
-; CHECK: Loop %loop: backedge-taken count is false
-; CHECK: Loop %loop: max backedge-taken count is false
-
-; CHECK: Determining loop execution counts for: @c
-; CHECK: Loop %loop: backedge-taken count is false
-; CHECK: Loop %loop: max backedge-taken count is false
-
-; CHECK: Determining loop execution counts for: @d
-; CHECK: Loop %loop: Unpredictable backedge-taken count.
-; CHECK: Loop %loop: Unpredictable max backedge-taken count.
-
define void @a(i64 %n) nounwind {
+; CHECK-LABEL: 'a'
+; CHECK-NEXT: Determining loop execution counts for: @a
+; CHECK-NEXT: Loop %loop: Unpredictable backedge-taken count.
+; CHECK-NEXT: Loop %loop: Unpredictable max backedge-taken count.
+; CHECK-NEXT: Loop %loop: Unpredictable predicated backedge-taken count.
+;
entry:
%t0 = icmp sgt i64 %n, 0
br i1 %t0, label %loop, label %return
@@ -33,6 +24,14 @@ return:
ret void
}
define void @b(i64 %n) nounwind {
+; CHECK-LABEL: 'b'
+; CHECK-NEXT: Determining loop execution counts for: @b
+; CHECK-NEXT: Loop %loop: backedge-taken count is false
+; CHECK-NEXT: Loop %loop: max backedge-taken count is false
+; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is false
+; CHECK-NEXT: Predicates:
+; CHECK: Loop %loop: Trip multiple is 1
+;
entry:
%t0 = icmp sgt i64 %n, 0
br i1 %t0, label %loop, label %return
@@ -47,6 +46,14 @@ return:
ret void
}
define void @c(i64 %n) nounwind {
+; CHECK-LABEL: 'c'
+; CHECK-NEXT: Determining loop execution counts for: @c
+; CHECK-NEXT: Loop %loop: backedge-taken count is false
+; CHECK-NEXT: Loop %loop: max backedge-taken count is false
+; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is false
+; CHECK-NEXT: Predicates:
+; CHECK: Loop %loop: Trip multiple is 1
+;
entry:
%t0 = icmp sgt i64 %n, 0
br i1 %t0, label %loop, label %return
@@ -61,6 +68,12 @@ return:
ret void
}
define void @d(i64 %n) nounwind {
+; CHECK-LABEL: 'd'
+; CHECK-NEXT: Determining loop execution counts for: @d
+; CHECK-NEXT: Loop %loop: Unpredictable backedge-taken count.
+; CHECK-NEXT: Loop %loop: Unpredictable max backedge-taken count.
+; CHECK-NEXT: Loop %loop: Unpredictable predicated backedge-taken count.
+;
entry:
%t0 = icmp sgt i64 %n, 0
br i1 %t0, label %loop, label %return
@@ -80,13 +93,15 @@ return:
; should return unknown.
; PR7416
-; CHECK: Determining loop execution counts for: @nonpolynomial
-; CHECK-NEXT: Loop %loophead: Unpredictable backedge-taken count
-; CHECK-NEXT: Loop %loophead: Unpredictable max backedge-taken count
-
declare i1 @g() nounwind
define void @nonpolynomial() {
+; CHECK-LABEL: 'nonpolynomial'
+; CHECK-NEXT: Determining loop execution counts for: @nonpolynomial
+; CHECK-NEXT: Loop %loophead: Unpredictable backedge-taken count.
+; CHECK-NEXT: Loop %loophead: Unpredictable max backedge-taken count.
+; CHECK-NEXT: Loop %loophead: Unpredictable predicated backedge-taken count.
+;
entry:
br label %loophead
loophead:
@@ -108,11 +123,15 @@ retbb:
; PHI nodes with all constant operands.
-; CHECK: Determining loop execution counts for: @constant_phi_operands
-; CHECK: Loop %loop: backedge-taken count is 1
-; CHECK: Loop %loop: max backedge-taken count is 1
-
define void @constant_phi_operands() nounwind {
+; CHECK-LABEL: 'constant_phi_operands'
+; CHECK-NEXT: Determining loop execution counts for: @constant_phi_operands
+; CHECK-NEXT: Loop %loop: backedge-taken count is 1
+; CHECK-NEXT: Loop %loop: max backedge-taken count is 1
+; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is 1
+; CHECK-NEXT: Predicates:
+; CHECK: Loop %loop: Trip multiple is 2
+;
entry:
br label %loop
@@ -129,10 +148,13 @@ return:
; One side of the expression test against a value that will be skipped.
; We can't assume undefined behavior just because we have an NSW flag.
;
-; CHECK: Determining loop execution counts for: @exit_orcond_nsw
-; CHECK: Loop %for.body.i: Unpredictable backedge-taken count.
-; CHECK: Loop %for.body.i: max backedge-taken count is 1
define void @exit_orcond_nsw(i32 *%a) nounwind {
+; CHECK-LABEL: 'exit_orcond_nsw'
+; CHECK-NEXT: Determining loop execution counts for: @exit_orcond_nsw
+; CHECK-NEXT: Loop %for.body.i: Unpredictable backedge-taken count.
+; CHECK-NEXT: Loop %for.body.i: max backedge-taken count is 1
+; CHECK-NEXT: Loop %for.body.i: Unpredictable predicated backedge-taken count.
+;
entry:
br label %for.body.i
OpenPOWER on IntegriCloud