2012-06-08-InfiniteLoop.ll 631 B

123456789101112131415161718192021
  1. ; RUN: opt < %s -reassociate -disable-output
  2. ; PR13041
  3. define void @foo() {
  4. entry:
  5. br label %while.cond
  6. while.cond: ; preds = %while.body, %entry
  7. %b.0 = phi i32 [ undef, %entry ], [ %sub2, %while.body ]
  8. %c.0 = phi i32 [ undef, %entry ], [ %sub3, %while.body ]
  9. br i1 undef, label %while.end, label %while.body
  10. while.body: ; preds = %while.cond
  11. %sub = sub nsw i32 0, %b.0
  12. %sub2 = sub nsw i32 %sub, %c.0
  13. %sub3 = sub nsw i32 0, %c.0
  14. br label %while.cond
  15. while.end: ; preds = %while.cond
  16. ret void
  17. }