blob: 5a02398104186c051c274142b4ba1fde8abf07c0 [file] [log] [blame]
Dmitri Gribenko10c4b4d2012-12-30 01:42:34 +00001; RUN: opt -indvars -scalar-evolution -analyze < %s | FileCheck %s
Tobias Grosserf07426b2011-01-20 21:03:22 +00002; This test checks if the SCEV analysis is printed out at all.
3; It failed once as the RequiredTransitive option was not implemented
4; correctly.
5
Dmitri Gribenko10c4b4d2012-12-30 01:42:34 +00006; CHECK: Classifying expressions for: @main
7
Tobias Grosserf07426b2011-01-20 21:03:22 +00008define i32 @main() nounwind {
9entry:
10 br label %for.cond
11
12for.cond: ; preds = %for.inc, %entry
13 %indvar1 = phi i64 [ %indvar.next2, %for.inc ], [ 0, %entry ] ; <i64> [#uses=3]
14 %exitcond = icmp ne i64 %indvar1, 1024 ; <i1> [#uses=1]
15 br i1 %exitcond, label %for.body, label %for.end
16
17for.body: ; preds = %for.cond
18 br label %for.inc
19
20for.inc: ; preds = %for.body
21 %indvar.next2 = add i64 %indvar1, 1 ; <i64> [#uses=1]
22 br label %for.cond
23
24for.end: ; preds = %for.cond
25 ret i32 0
26}