1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
llvm-mirror/test/CodeGen/ARM/debugtrap.ll
Alexandros Lamprineas 1eca4c99e9 [ARM] Emit trap instruction using .inst directive
The trap instruction is emitted as a data-in-text rather
than an instruction. This patch uses the .inst directive
for emitting trap.

Differential Revision: http://reviews.llvm.org/D16684

llvm-svn: 259182
2016-01-29 10:23:32 +00:00

18 lines
456 B
LLVM

; 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: .inst 0xe7ffdefe
call void @foo()
call void @llvm.debugtrap()
ret void
}