2016-01-04 01:22:03 +08:00
|
|
|
; This test ensures the @llvm.debugtrap() call is not removed when generating
|
|
|
|
; the 'pop' instruction to restore the callee saved registers on ARM.
|
|
|
|
|
|
|
|
; RUN: llc < %s -mtriple=armv7 -O0 -filetype=asm | FileCheck %s
|
|
|
|
|
|
|
|
declare void @llvm.debugtrap() nounwind
|
|
|
|
declare void @foo() nounwind
|
|
|
|
|
|
|
|
define void @test() nounwind {
|
|
|
|
entry:
|
|
|
|
; CHECK: bl foo
|
|
|
|
; CHECK-NEXT: pop
|
2016-01-29 18:23:32 +08:00
|
|
|
; CHECK-NEXT: .inst 0xe7ffdefe
|
2016-01-04 01:22:03 +08:00
|
|
|
call void @foo()
|
|
|
|
call void @llvm.debugtrap()
|
|
|
|
ret void
|
|
|
|
}
|