Dan Gohman | 8a977e2 | 2010-01-26 19:25:59 +0000 | [diff] [blame] | 1 | ; RUN: opt < %s -analyze -scalar-evolution | grep smax | count 2 |
| 2 | ; RUN: opt < %s -analyze -scalar-evolution | grep \ |
Chandler Carruth | 4177e6f | 2012-07-02 12:47:22 +0000 | [diff] [blame] | 3 | ; RUN: "%. smax %. smax %." |
Nick Lewycky | c54c561 | 2007-11-25 22:41:31 +0000 | [diff] [blame] | 4 | ; PR1614 |
| 5 | |
| 6 | define 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 | } |