1*9880d681SAndroid Build Coastguard Worker; This test ensures the @llvm.debugtrap() call is not removed when generating 2*9880d681SAndroid Build Coastguard Worker; the 'pop' instruction to restore the callee saved registers on ARM. 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=armv7 -O0 -filetype=asm | FileCheck %s 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.debugtrap() nounwind 7*9880d681SAndroid Build Coastguard Workerdeclare void @foo() nounwind 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Workerdefine void @test() nounwind { 10*9880d681SAndroid Build Coastguard Workerentry: 11*9880d681SAndroid Build Coastguard Worker ; CHECK: bl foo 12*9880d681SAndroid Build Coastguard Worker ; CHECK-NEXT: pop 13*9880d681SAndroid Build Coastguard Worker ; CHECK-NEXT: .inst 0xe7ffdefe 14*9880d681SAndroid Build Coastguard Worker call void @foo() 15*9880d681SAndroid Build Coastguard Worker call void @llvm.debugtrap() 16*9880d681SAndroid Build Coastguard Worker ret void 17*9880d681SAndroid Build Coastguard Worker} 18