Dan Gohman | 3c7d308 | 2009-09-11 18:01:28 +0000 | [diff] [blame^] | 1 | ; RUN: opt < %s -indvars |
Evan Cheng | 27b8406 | 2009-04-22 23:39:28 +0000 | [diff] [blame] | 2 | ; rdar://6817574 |
Evan Cheng | eecb868 | 2009-04-22 22:45:37 +0000 | [diff] [blame] | 3 | |
Evan Cheng | 27b8406 | 2009-04-22 23:39:28 +0000 | [diff] [blame] | 4 | define i32 @t1() nounwind ssp { |
Evan Cheng | eecb868 | 2009-04-22 22:45:37 +0000 | [diff] [blame] | 5 | entry: |
| 6 | br label %bb32 |
| 7 | |
| 8 | bb32: ; preds = %bb32, %entry |
| 9 | %mbPartIdx.0.reg2mem.0 = phi i8 [ %2, %bb32 ], [ 0, %entry ] ; <i8> [#uses=3] |
| 10 | %0 = and i8 %mbPartIdx.0.reg2mem.0, 1 ; <i8> [#uses=0] |
| 11 | %1 = zext i8 %mbPartIdx.0.reg2mem.0 to i64 ; <i64> [#uses=0] |
| 12 | %2 = add i8 %mbPartIdx.0.reg2mem.0, 1 ; <i8> [#uses=2] |
| 13 | %3 = icmp ugt i8 %2, 3 ; <i1> [#uses=1] |
| 14 | br i1 %3, label %bb41, label %bb32 |
| 15 | |
| 16 | bb41: ; preds = %bb32 |
| 17 | ret i32 0 |
| 18 | } |
Evan Cheng | 27b8406 | 2009-04-22 23:39:28 +0000 | [diff] [blame] | 19 | |
| 20 | define i32 @t2() nounwind ssp { |
| 21 | entry: |
| 22 | br label %bb116 |
| 23 | |
| 24 | bb116: ; preds = %bb116, %entry |
| 25 | %mbPartIdx.1.reg2mem.0 = phi i8 [ %3, %bb116 ], [ 0, %entry ] ; <i8> [#uses=3] |
| 26 | %0 = and i8 %mbPartIdx.1.reg2mem.0, 1 ; <i8> [#uses=1] |
| 27 | %1 = zext i8 %mbPartIdx.1.reg2mem.0 to i64 ; <i64> [#uses=0] |
| 28 | %2 = zext i8 %0 to i32 ; <i32> [#uses=0] |
| 29 | %3 = add i8 %mbPartIdx.1.reg2mem.0, 1 ; <i8> [#uses=2] |
| 30 | %4 = icmp ugt i8 %3, 3 ; <i1> [#uses=1] |
| 31 | br i1 %4, label %bb131, label %bb116 |
| 32 | |
| 33 | bb131: ; preds = %bb116 |
| 34 | unreachable |
| 35 | } |