summaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/AArch64/ubsantrap.ll
blob: fafc195f04e03bfe585627ec7d93453c0217c1b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; RUN: llc -mtriple=arm64-apple-ios %s -o - | FileCheck %s
; RUN: llc -mtriple=arm64-apple-ios -global-isel %s -o - | FileCheck %s

define void @test_ubsantrap() {
; CHECK-LABEL: test_ubsantrap
; CHECK: brk #0x550c
  call void @llvm.ubsantrap(i8 12)
  ret void
}

define void @test_ubsantrap_function() {
; CHECK-LABEL: test_ubsantrap_function:
; CHECK: mov w0, #12
; CHECK: bl _wibble
  call void @llvm.ubsantrap(i8 12) "trap-func-name"="wibble"
  ret void
}

declare void @llvm.ubsantrap(i8)