summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/debugtrap.ll
blob: 9ce73939ce5694f7faa85cca482efdf4606096fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
; 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
  ; CHECK-NEXT: trap
  call void @foo()
  call void @llvm.debugtrap()
  ret void
}
OpenPOWER on IntegriCloud