Do not convert "call asm" to "invoke asm" in Inliner.
[oota-llvm.git] / test / Transforms / Inline / inline_invoke_with_asm_call.ll
1 ; RUN: opt < %s -inline -S | FileCheck %s
2 target triple = "x86_64-apple-darwin"
3
4 ; rdar://15317907
5 ; CHECK-LABEL: @caller
6 ; Make sure we are generating "call asm" instead of "invoke asm".
7 ; CHECK: call void asm
8 ; CHECK-LABEL: @callee_with_asm
9 define void @caller() {
10   br i1 undef, label %1, label %4
11
12 ; <label>:1
13   invoke void @callee_with_asm()
14           to label %4 unwind label %2
15
16 ; <label>:2
17   %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*)
18           cleanup
19   resume { i8*, i32 } undef
20
21 ; <label>:4
22   ret void
23 }
24
25 define void @callee_with_asm() {
26   call void asm sideeffect "mov\09r7, r7\09\09@ marker for objc_retainAutoreleaseReturnValue", ""()
27   ret void
28 }
29
30 declare i32 @__objc_personality_v0(...)