crash.ll 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. ; RUN: opt -licm -disable-output < %s
  2. target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
  3. target triple = "x86_64-apple-darwin10.0.0"
  4. ; PR8068
  5. @g_12 = external global i8, align 1
  6. define void @test1() nounwind ssp {
  7. entry:
  8. br label %for.body
  9. for.body: ; preds = %for.cond, %bb.nph
  10. store i8 0, i8* @g_12, align 1
  11. %tmp6 = load i8, i8* @g_12, align 1
  12. br label %for.cond
  13. for.cond: ; preds = %for.body
  14. store i8 %tmp6, i8* @g_12, align 1
  15. br i1 false, label %for.cond.for.end10_crit_edge, label %for.body
  16. for.cond.for.end10_crit_edge: ; preds = %for.cond
  17. br label %for.end10
  18. for.end10: ; preds = %for.cond.for.end10_crit_edge, %entry
  19. ret void
  20. }
  21. ; PR8067
  22. @g_8 = external global i32, align 4
  23. define void @test2() noreturn nounwind ssp {
  24. entry:
  25. br label %for.body
  26. for.body: ; preds = %for.body, %entry
  27. %tmp7 = load i32, i32* @g_8, align 4
  28. store i32* @g_8, i32** undef, align 16
  29. store i32 undef, i32* @g_8, align 4
  30. br label %for.body
  31. }
  32. ; PR8102
  33. define void @test3() {
  34. entry:
  35. %__first = alloca { i32* }
  36. br i1 undef, label %for.cond, label %for.end
  37. for.cond: ; preds = %for.cond, %entry
  38. %tmp1 = getelementptr { i32*}, { i32*}* %__first, i32 0, i32 0
  39. %tmp2 = load i32*, i32** %tmp1, align 4
  40. %call = tail call i32* @test3helper(i32* %tmp2)
  41. %tmp3 = getelementptr { i32*}, { i32*}* %__first, i32 0, i32 0
  42. store i32* %call, i32** %tmp3, align 4
  43. br i1 false, label %for.cond, label %for.end
  44. for.end: ; preds = %for.cond, %entry
  45. ret void
  46. }
  47. declare i32* @test3helper(i32*)
  48. ; PR8602
  49. @g_47 = external global i32, align 4
  50. define void @test4() noreturn nounwind {
  51. br label %1
  52. ; <label>:1 ; preds = %1, %0
  53. store volatile i32* @g_47, i32** undef, align 8
  54. store i32 undef, i32* @g_47, align 4
  55. br label %1
  56. }