Dan Gohman | 36a0947 | 2009-09-08 23:54:48 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=i386-apple-darwin9 |
Evan Cheng | d521bc9 | 2009-04-27 17:36:47 +0000 | [diff] [blame] | 2 | ; PR4056 |
| 3 | |
| 4 | define void @int163(i32 %p_4, i32 %p_5) nounwind { |
| 5 | entry: |
| 6 | %0 = tail call i32 @bar(i32 1) nounwind ; <i32> [#uses=2] |
| 7 | %1 = icmp sgt i32 %0, 7 ; <i1> [#uses=1] |
| 8 | br i1 %1, label %foo.exit, label %bb.i |
| 9 | |
| 10 | bb.i: ; preds = %entry |
| 11 | %2 = lshr i32 1, %0 ; <i32> [#uses=1] |
| 12 | %3 = icmp eq i32 %2, 0 ; <i1> [#uses=1] |
| 13 | %4 = zext i1 %3 to i32 ; <i32> [#uses=1] |
| 14 | %.p_5 = shl i32 %p_5, %4 ; <i32> [#uses=1] |
| 15 | br label %foo.exit |
| 16 | |
| 17 | foo.exit: ; preds = %bb.i, %entry |
| 18 | %5 = phi i32 [ %.p_5, %bb.i ], [ %p_5, %entry ] ; <i32> [#uses=1] |
| 19 | %6 = icmp eq i32 %5, 0 ; <i1> [#uses=0] |
| 20 | %7 = tail call i32 @bar(i32 %p_5) nounwind ; <i32> [#uses=0] |
| 21 | ret void |
| 22 | } |
| 23 | |
| 24 | declare i32 @bar(i32) |