1 ; RUN: llc -mtriple=x86_64-linux-gnu %s -o - | FileCheck %s
2 ; RUN: llc -mtriple=x86_64-scei-ps4 %s -o - | FileCheck --check-prefix=PS4 %s
3 ; RUN: llc -mtriple=x86_64-sie-ps5 %s -o - | FileCheck --check-prefix=PS4 %s
5 define void @test_ubsantrap() {
6 ; CHECK-LABEL: test_ubsantrap
7 ; CHECK: ud1l 12(%eax), %eax
8 ; PS4-LABEL: test_ubsantrap
11 call void @llvm.ubsantrap(i8 12)
15 define void @test_ubsantrap_function() {
16 ; CHECK-LABEL: test_ubsantrap_function:
17 ; CHECK: movl $12, %edi
19 call void @llvm.ubsantrap(i8 12) "trap-func-name"="wibble"
23 declare void @llvm.ubsantrap(i8)