• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; 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=armv4 -O0 -filetype=asm | FileCheck --check-prefixes=CHECK,V4 %s
5; RUN: llc < %s -mtriple=armv5 -O0 -filetype=asm | FileCheck --check-prefixes=CHECK,V5 %s
6; RUN: llc < %s -mtriple=thumbv4 -O0 -filetype=asm | FileCheck --check-prefixes=CHECK,V4 %s
7; RUN: llc < %s -mtriple=thumbv5 -O0 -filetype=asm | FileCheck --check-prefixes=CHECK,V5 %s
8
9declare void @llvm.debugtrap() nounwind
10declare void @foo() nounwind
11
12define void @test() nounwind {
13entry:
14  ; CHECK: bl foo
15  ; V4-NEXT: udf #254
16  ; V5-NEXT: bkpt #0
17  ; CHECK-NEXT: pop
18  call void @foo()
19  call void @llvm.debugtrap()
20  ret void
21}
22