inline-invoke-with-asm-call.ll 905 B

1234567891011121314151617181920212223242526272829303132
  1. ; RUN: opt < %s -inline -S | FileCheck %s
  2. target triple = "x86_64-apple-darwin"
  3. ; In inliner, we assume that inline asm does not throw. This testing case makes
  4. ; sure that the inliner does not convert "call asm" to "invoke asm".
  5. ; rdar://15317907
  6. ; CHECK-LABEL: @caller
  7. ; Make sure we are generating "call asm" instead of "invoke asm".
  8. ; CHECK: call void asm
  9. ; CHECK-LABEL: @callee_with_asm
  10. define void @caller() personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) {
  11. br i1 undef, label %1, label %4
  12. ; <label>:1
  13. invoke void @callee_with_asm()
  14. to label %4 unwind label %2
  15. ; <label>:2
  16. %3 = landingpad { i8*, i32 }
  17. cleanup
  18. resume { i8*, i32 } undef
  19. ; <label>:4
  20. ret void
  21. }
  22. define void @callee_with_asm() {
  23. call void asm sideeffect "mov\09r7, r7\09\09@ marker for objc_retainAutoreleaseReturnValue", ""()
  24. ret void
  25. }
  26. declare i32 @__objc_personality_v0(...)