1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -verify-coalescing 2*9880d681SAndroid Build Coastguard Worker; <rdar://problem/11522048> 3*9880d681SAndroid Build Coastguard Workertarget triple = "arm64-apple-macosx10.8.0" 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker; Verify that we can handle spilling the stack pointer without attempting 6*9880d681SAndroid Build Coastguard Worker; spilling it directly. 7*9880d681SAndroid Build Coastguard Worker; CHECK: f 8*9880d681SAndroid Build Coastguard Worker; CHECK: mov [[X0:x[0-9]+]], sp 9*9880d681SAndroid Build Coastguard Worker; CHECK: str [[X0]] 10*9880d681SAndroid Build Coastguard Worker; CHECK: inlineasm 11*9880d681SAndroid Build Coastguard Workerdefine void @f() nounwind ssp { 12*9880d681SAndroid Build Coastguard Workerentry: 13*9880d681SAndroid Build Coastguard Worker %savedstack = call i8* @llvm.stacksave() nounwind 14*9880d681SAndroid Build Coastguard Worker call void asm sideeffect "; inlineasm", "~{x0},~{x1},~{x2},~{x3},~{x4},~{x5},~{x6},~{x7},~{x8},~{x9},~{x10},~{x11},~{x12},~{x13},~{x14},~{x15},~{x16},~{x17},~{x18},~{x19},~{x20},~{x21},~{x22},~{x23},~{x24},~{x25},~{x26},~{x27},~{x28},~{fp},~{lr},~{sp},~{memory}"() nounwind 15*9880d681SAndroid Build Coastguard Worker call void @llvm.stackrestore(i8* %savedstack) nounwind 16*9880d681SAndroid Build Coastguard Worker ret void 17*9880d681SAndroid Build Coastguard Worker} 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Workerdeclare i8* @llvm.stacksave() nounwind 20*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.stackrestore(i8*) nounwind 21