blob: 3d8cdea6cdae77535db09a0b5b784a890f388c51 [file] [log] [blame]
Dimitry Andric227b9282016-01-03 17:22:03 +00001; This test ensures the @llvm.debugtrap() call is not removed when generating
2; the 'pop' instruction to restore the callee saved registers on ARM.
3
4; RUN: llc < %s -mtriple=armv7 -O0 -filetype=asm | FileCheck %s
5
6declare void @llvm.debugtrap() nounwind
7declare void @foo() nounwind
8
9define void @test() nounwind {
10entry:
11 ; CHECK: bl foo
12 ; CHECK-NEXT: pop
13 ; CHECK-NEXT: trap
14 call void @foo()
15 call void @llvm.debugtrap()
16 ret void
17}