1 ; RUN: opt < %s -analyze -enable-new-pm=0 -scalar-evolution 2>&1 | FileCheck %s
2 ; RUN: opt < %s -disable-output "-passes=print<scalar-evolution>" 2>&1 2>&1 | FileCheck %s
5 ; CHECK: (((-1 * %i0) + (100005 smax %i0)) /u 5)
7 define i32 @foo0(i32 %i0) nounwind {
12 %0 = add i32 %j.0, 1 ; <i32> [#uses=1]
13 %1 = add i32 %i.0, 5 ; <i32> [#uses=1]
16 bb1: ; preds = %bb, %entry
17 %j.0 = phi i32 [ 0, %entry ], [ %0, %bb ] ; <i32> [#uses=2]
18 %i.0 = phi i32 [ %i0, %entry ], [ %1, %bb ] ; <i32> [#uses=2]
19 %2 = icmp sgt i32 %i.0, 100000 ; <i1> [#uses=1]
20 br i1 %2, label %return, label %bb
22 return: ; preds = %bb1