invoke_unwind.ll 626 B

1234567891011121314151617181920
  1. ; RUN: opt < %s -simplifycfg -S | FileCheck %s
  2. declare void @bar()
  3. ; This testcase checks to see if the simplifycfg pass is converting invoke
  4. ; instructions to call instructions if the handler just rethrows the exception.
  5. define i32 @test1() personality i32 (...)* @__gxx_personality_v0 {
  6. ; CHECK-LABEL: @test1(
  7. ; CHECK-NEXT: call void @bar()
  8. ; CHECK-NEXT: ret i32 0
  9. invoke void @bar( )
  10. to label %1 unwind label %Rethrow
  11. ret i32 0
  12. Rethrow:
  13. %exn = landingpad {i8*, i32}
  14. catch i8* null
  15. resume { i8*, i32 } %exn
  16. }
  17. declare i32 @__gxx_personality_v0(...)