blob: fdb3c26c9b71369b2fc0678b1d1b32eebc05220e [file] [log] [blame]
Nick Lewyckyc54c5612007-11-25 22:41:31 +00001; RUN: llvm-as < %s | opt -analyze -scalar-evolution | grep smax | count 2
2; RUN: llvm-as < %s | opt -analyze -scalar-evolution | grep \
Nick Lewycky505242f2008-05-26 01:27:08 +00003; RUN: {%. smax %. smax %.}
Nick Lewyckyc54c5612007-11-25 22:41:31 +00004; PR1614
5
6define i32 @x(i32 %a, i32 %b, i32 %c) {
7 %A = icmp sgt i32 %a, %b
8 %B = select i1 %A, i32 %a, i32 %b
9 %C = icmp sle i32 %c, %B
10 %D = select i1 %C, i32 %B, i32 %c
11 ret i32 %D
12}