1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/test/CodeGen/AArch64/windows-trap.ll
Eli Friedman 2b52060063 [AArch64] [Windows] Trap after noreturn calls.
Like the comment says, this isn't the most efficient fix in terms of
codesize, but it works.

Differential Revision: https://reviews.llvm.org/D54129

llvm-svn: 346358
2018-11-07 21:31:14 +00:00

18 lines
489 B
LLVM

; RUN: llc -mtriple=aarch64-win32 %s -o - | FileCheck %s
declare void @callee() noreturn
; Make sure the call isn't the last instruction in the function; if it is,
; unwinding may break.
;
; (The instruction after the call doesn't have to be anything in particular,
; but trapping has the nice side-effect of catching bugs.)
define void @test_unreachable() {
; CHECK-LABEL: test_unreachable:
; CHECK: bl callee
; CHECK-NEXT: brk #0x1
call void @callee() noreturn
unreachable
}