1; RUN: llc -o - %s -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=CHECK 2; RUN: llc -global-isel -o - %s -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=CHECK 3; RUN: llc -fast-isel -o - %s -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=CHECK 4; RUN: llc --trap-unreachable -o - %s -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=CHECK,TRAP_UNREACHABLE 5; RUN: llc --trap-unreachable -global-isel -o - %s -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=CHECK,TRAP_UNREACHABLE 6; RUN: llc --trap-unreachable -fast-isel -o - %s -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=CHECK,TRAP_UNREACHABLE 7 8; CHECK-LABEL: ubsantrap: 9; CHECK: ud1l 12(%eax), %eax 10; CHECK-NOT: ud2 11define i32 @ubsantrap() noreturn nounwind { 12 call void @llvm.ubsantrap(i8 12) 13 unreachable 14} 15 16; CHECK-LABEL: ubsantrap_fn_attr: 17; CHECK: callq {{_?}}ubsantrap_func 18; TRAP_UNREACHABLE: ud2 19; CHECK-NOT: ud2 20define i32 @ubsantrap_fn_attr() noreturn nounwind { 21 call void @llvm.ubsantrap(i8 12) "trap-func-name"="ubsantrap_func" 22 unreachable 23} 24 25declare void @llvm.ubsantrap(i8) cold noreturn nounwind 26