source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Analysis/ScalarEvolution/2008-02-15-UMax.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 381 bytes
Line 
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
Note: See TracBrowser for help on using the repository browser.