1 ; RUN: opt -disable-output "-passes=print<scalar-evolution>" < %s 2>&1 | FileCheck %s
3 ; This loop has no preheader, multiple backedges, etc., but ScalarEvolution
4 ; should still be able to analyze it.
6 ; CHECK: %i = phi i64 [ 5, %entry ], [ 5, %alt ], [ %i.next, %loop.a ], [ %i.next, %loop.b ]
7 ; CHECK-NEXT: --> {5,+,1}<%loop>
9 define void @foo(i1 %p, i1 %q, i1 %s, i1 %u) {
11 br i1 %p, label %loop, label %alt
14 br i1 %s, label %loop, label %exit
17 %i = phi i64 [ 5, %entry ], [ 5, %alt ], [ %i.next, %loop.a ], [ %i.next, %loop.b ]
18 %i.next = add i64 %i, 1
19 br i1 %q, label %loop.a, label %loop.b
25 br i1 %u, label %loop, label %exit