xref: /llvm-project/llvm/test/CodeGen/AArch64/ubsantrap.ll (revision f9d69a0ab02567933302602238264a38468f9900)
1; RUN: llc -mtriple=arm64-apple-ios %s -o - | FileCheck %s
2; RUN: llc -mtriple=arm64-apple-ios -global-isel %s -o - | FileCheck %s
3
4define void @test_ubsantrap() {
5; CHECK-LABEL: test_ubsantrap
6; CHECK: brk #0x550c
7  call void @llvm.ubsantrap(i8 12)
8  ret void
9}
10
11define void @test_ubsantrap_function() {
12; CHECK-LABEL: test_ubsantrap_function:
13; CHECK: mov w0, #12
14; CHECK: bl _wibble
15  call void @llvm.ubsantrap(i8 12) "trap-func-name"="wibble"
16  ret void
17}
18
19declare void @llvm.ubsantrap(i8)
20