repo.or.cz
/
llvm-core.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[InstCombine] Signed saturation patterns
[llvm-core.git]
/
test
/
Analysis
/
ScalarEvolution
/
2008-02-15-UMax.ll
blob
527fd273cd25ba243a6f0a4761bff637c8e9fa61
1
; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
2
; PR2003
3
4
; CHECK: umax
5
6
define i32 @foo(i32 %n) {
7
entry:
8
br label %header
9
header:
10
%i = phi i32 [ 100, %entry ], [ %i.inc, %next ]
11
%cond = icmp ult i32 %i, %n
12
br i1 %cond, label %next, label %return
13
next:
14
%i.inc = add i32 %i, 1
15
br label %header
16
return:
17
ret i32 %i
18
}
19