1; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s 2; PR2003 3 4; CHECK: umax 5 6define i32 @foo(i32 %n) { 7entry: 8 br label %header 9header: 10 %i = phi i32 [ 100, %entry ], [ %i.inc, %next ] 11 %cond = icmp ult i32 %i, %n 12 br i1 %cond, label %next, label %return 13next: 14 %i.inc = add i32 %i, 1 15 br label %header 16return: 17 ret i32 %i 18} 19 20