crash.ll 696 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ; RUN: opt < %s -mem2reg -S
  2. ; PR5023
  3. declare i32 @test1f()
  4. define i32 @test1() personality i32 (...)* @__gxx_personality_v0 {
  5. entry:
  6. %whichFlag = alloca i32
  7. %A = invoke i32 @test1f()
  8. to label %invcont2 unwind label %lpad86
  9. invcont2:
  10. store i32 %A, i32* %whichFlag
  11. br label %bb15
  12. bb15:
  13. %B = load i32, i32* %whichFlag
  14. ret i32 %B
  15. lpad86:
  16. %exn = landingpad {i8*, i32}
  17. cleanup
  18. br label %bb15
  19. }
  20. declare i32 @__gxx_personality_v0(...)
  21. define i32 @test2() {
  22. entry:
  23. %whichFlag = alloca i32
  24. br label %bb15
  25. bb15:
  26. %B = load i32, i32* %whichFlag
  27. ret i32 %B
  28. invcont2:
  29. %C = load i32, i32* %whichFlag
  30. store i32 %C, i32* %whichFlag
  31. br label %bb15
  32. }