crash.ll 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. ; RUN: opt < %s -loop-unswitch -disable-output
  2. define void @test1(i32* %S2) {
  3. entry:
  4. br i1 false, label %list_Length.exit, label %cond_true.i
  5. cond_true.i: ; preds = %entry
  6. ret void
  7. list_Length.exit: ; preds = %entry
  8. br i1 false, label %list_Length.exit9, label %cond_true.i5
  9. cond_true.i5: ; preds = %list_Length.exit
  10. ret void
  11. list_Length.exit9: ; preds = %list_Length.exit
  12. br i1 false, label %bb78, label %return
  13. bb44: ; preds = %bb78, %cond_next68
  14. br i1 %tmp49.not, label %bb62, label %bb62.loopexit
  15. bb62.loopexit: ; preds = %bb44
  16. br label %bb62
  17. bb62: ; preds = %bb62.loopexit, %bb44
  18. br i1 false, label %return.loopexit, label %cond_next68
  19. cond_next68: ; preds = %bb62
  20. br i1 false, label %return.loopexit, label %bb44
  21. bb78: ; preds = %list_Length.exit9
  22. %tmp49.not = icmp eq i32* %S2, null ; <i1> [#uses=1]
  23. br label %bb44
  24. return.loopexit: ; preds = %cond_next68, %bb62
  25. %retval.0.ph = phi i32 [ 1, %cond_next68 ], [ 0, %bb62 ] ; <i32> [#uses=1]
  26. br label %return
  27. return: ; preds = %return.loopexit, %list_Length.exit9
  28. %retval.0 = phi i32 [ 0, %list_Length.exit9 ], [ %retval.0.ph, %return.loopexit ] ; <i32> [#uses=0]
  29. ret void
  30. }
  31. define void @test2(i32 %x1, i32 %y1, i32 %z1, i32 %r1) nounwind {
  32. entry:
  33. br label %bb.nph
  34. bb.nph: ; preds = %entry
  35. %and.i13521 = and <4 x i1> undef, undef ; <<4 x i1>> [#uses=1]
  36. br label %for.body
  37. for.body: ; preds = %for.body, %bb.nph
  38. %or.i = select <4 x i1> %and.i13521, <4 x i32> undef, <4 x i32> undef ; <<4 x i32>> [#uses=0]
  39. br i1 false, label %for.body, label %for.end
  40. for.end: ; preds = %for.body, %entry
  41. ret void
  42. }
  43. ; PR6879
  44. define i32* @test3(i32** %p_45, i16 zeroext %p_46, i64 %p_47, i64 %p_48, i16 signext %p_49) nounwind {
  45. entry:
  46. br label %for.cond
  47. for.cond: ; preds = %for.cond4, %entry
  48. br i1 false, label %for.cond4, label %for.end88
  49. for.cond4: ; preds = %for.cond
  50. %conv46 = trunc i32 0 to i8 ; <i8> [#uses=2]
  51. %cmp60 = icmp sgt i8 %conv46, 124 ; <i1> [#uses=1]
  52. %or.cond = and i1 undef, %cmp60 ; <i1> [#uses=1]
  53. %cond = select i1 %or.cond, i8 %conv46, i8 undef ; <i8> [#uses=0]
  54. br label %for.cond
  55. for.end88: ; preds = %for.cond
  56. ret i32* undef
  57. }