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