dce_pure_invoke.ll 460 B

12345678910111213141516171819
  1. ; RUN: opt < %s -adce -S | grep null
  2. declare i32 @strlen(i8*) readnone
  3. define i32 @test() personality i32 (...)* @__gxx_personality_v0 {
  4. ; invoke of pure function should not be deleted!
  5. invoke i32 @strlen( i8* null ) readnone
  6. to label %Cont unwind label %Other ; <i32>:1 [#uses=0]
  7. Cont: ; preds = %0
  8. ret i32 0
  9. Other: ; preds = %0
  10. %exn = landingpad {i8*, i32}
  11. cleanup
  12. ret i32 1
  13. }
  14. declare i32 @__gxx_personality_v0(...)