2007-11-26 06:41:31 +08:00
|
|
|
; RUN: llvm-as < %s | opt -analyze -scalar-evolution | grep smax | count 2
|
|
|
|
; RUN: llvm-as < %s | opt -analyze -scalar-evolution | grep \
|
2008-09-15 01:21:12 +08:00
|
|
|
; RUN: {%. smax %. smax %.}
|
2007-11-26 06:41:31 +08:00
|
|
|
; PR1614
|
|
|
|
|
|
|
|
define i32 @x(i32 %a, i32 %b, i32 %c) {
|
|
|
|
%A = icmp sgt i32 %a, %b
|
|
|
|
%B = select i1 %A, i32 %a, i32 %b
|
|
|
|
%C = icmp sle i32 %c, %B
|
|
|
|
%D = select i1 %C, i32 %B, i32 %c
|
|
|
|
ret i32 %D
|
|
|
|
}
|