Duncan Sands | 69938a8 | 2012-06-08 13:37:30 +0000 | [diff] [blame] | 1 | ; RUN: opt < %s -reassociate -disable-output |
| 2 | ; PR13041 |
| 3 | |
| 4 | define void @foo() { |
| 5 | entry: |
| 6 | br label %while.cond |
| 7 | |
| 8 | while.cond: ; preds = %while.body, %entry |
| 9 | %b.0 = phi i32 [ undef, %entry ], [ %sub2, %while.body ] |
| 10 | %c.0 = phi i32 [ undef, %entry ], [ %sub3, %while.body ] |
| 11 | br i1 undef, label %while.end, label %while.body |
| 12 | |
| 13 | while.body: ; preds = %while.cond |
| 14 | %sub = sub nsw i32 0, %b.0 |
| 15 | %sub2 = sub nsw i32 %sub, %c.0 |
| 16 | %sub3 = sub nsw i32 0, %c.0 |
| 17 | br label %while.cond |
| 18 | |
| 19 | while.end: ; preds = %while.cond |
| 20 | ret void |
| 21 | } |