2011-03-08-UnreachableUse.ll 1006 B

12345678910111213141516171819202122232425262728293031
  1. ; RUN: opt < %s -simplifycfg -S | FileCheck %s
  2. ; PR9420
  3. ; Note that the crash in PR9420 test is sensitive to the ordering of
  4. ; the transformations done by SimplifyCFG, so this test is likely to rot
  5. ; quickly.
  6. define noalias i8* @func_29() nounwind {
  7. ; CHECK: entry:
  8. ; CHECK-NEXT: unreachable
  9. entry:
  10. br label %for.cond
  11. for.cond: ; preds = %for.inc38, %entry
  12. %p_34.addr.0 = phi i16 [ 1, %entry ], [ %conv40, %for.inc38 ]
  13. br label %for.cond1
  14. for.cond1: ; preds = %for.inc29, %for.cond
  15. %p_32.addr.0 = phi i1 [ true, %for.cond ], [ true, %for.inc29 ]
  16. br i1 %p_32.addr.0, label %for.body8, label %for.inc38
  17. for.body8: ; preds = %for.cond1
  18. unreachable
  19. for.inc29: ; preds = %for.cond17
  20. br label %for.cond1
  21. for.inc38: ; preds = %for.end32
  22. %conv40 = add i16 %p_34.addr.0, 1
  23. br label %for.cond
  24. }