crash.ll 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. ; RUN: opt -inline -argpromotion < %s
  2. ; rdar://7879828
  3. define void @foo() personality i32 (...)* @__gxx_personality_v0 {
  4. invoke void @foo2()
  5. to label %if.end432 unwind label %for.end520
  6. if.end432:
  7. unreachable
  8. for.end520:
  9. %exn = landingpad {i8*, i32}
  10. cleanup
  11. unreachable
  12. }
  13. define internal void @foo2() ssp {
  14. %call7 = call fastcc i8* @foo3(i1 (i8*)* @foo4)
  15. %call58 = call fastcc i8* @foo3(i1 (i8*)* @foo5)
  16. unreachable
  17. }
  18. define internal fastcc i8* @foo3(i1 (i8*)* %Pred) {
  19. entry:
  20. unreachable
  21. }
  22. define internal i1 @foo4(i8* %O) nounwind {
  23. entry:
  24. %call = call zeroext i1 @foo5(i8* %O) ; <i1> [#uses=0]
  25. unreachable
  26. }
  27. define internal i1 @foo5(i8* %O) nounwind {
  28. entry:
  29. ret i1 undef
  30. }
  31. ; PR8932 - infinite promotion.
  32. %0 = type { %0* }
  33. define i32 @test2(i32 %a) {
  34. init:
  35. %0 = alloca %0
  36. %1 = alloca %0
  37. %2 = call i32 @"clay_assign(Chain, Chain)"(%0* %0, %0* %1)
  38. ret i32 0
  39. }
  40. define internal i32 @"clay_assign(Chain, Chain)"(%0* %c, %0* %d) {
  41. init:
  42. %0 = getelementptr %0, %0* %d, i32 0, i32 0
  43. %1 = load %0*, %0** %0
  44. %2 = getelementptr %0, %0* %c, i32 0, i32 0
  45. %3 = load %0*, %0** %2
  46. %4 = call i32 @"clay_assign(Chain, Chain)"(%0* %3, %0* %1)
  47. ret i32 0
  48. }
  49. declare i32 @__gxx_personality_v0(...)