brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · de02779 Raw
73 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s                                   -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=ALL,X643; RUN: llc < %s -fast-isel -fast-isel-abort=1     -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=ALL,X644; RUN: llc < %s -global-isel -global-isel-abort=1 -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=ALL,GISEL-X645; RUN: llc < %s                                   -mtriple=i686-linux-gnu   | FileCheck %s --check-prefixes=ALL,X866; RUN: llc < %s -fast-isel -fast-isel-abort=1     -mtriple=i686-linux-gnu   | FileCheck %s --check-prefixes=ALL,X867; RUN: llc < %s -global-isel -global-isel-abort=1 -mtriple=i686-linux-gnu   | FileCheck %s --check-prefixes=ALL,GISEL-X868 9declare void @llvm.trap()10 11define void @test_trap() {12; ALL-LABEL: test_trap:13; ALL:       # %bb.0:14; ALL-NEXT:    ud215; ALL-NEXT:    ret{{[l|q]}}16  tail call void @llvm.trap()17  ret void18}19 20define void @test_debugtrap() {21; ALL-LABEL: test_debugtrap:22; ALL:       # %bb.0:23; ALL-NEXT:    int324; ALL-NEXT:    ret{{[l|q]}}25  tail call void @llvm.debugtrap()26  ret void27}28 29define void @test_ubsantrap() {30; ALL-LABEL: test_ubsantrap:31; ALL:       # %bb.0:32; ALL-NEXT:    ud1l 12(%eax), %eax33; ALL-NEXT:    ret{{[l|q]}}34  call void @llvm.ubsantrap(i8 12)35  ret void36}37 38define void @test_ubsantrap_custom() nounwind {39; X64-LABEL: test_ubsantrap_custom:40; X64:       # %bb.0:41; X64-NEXT:    pushq %rax42; X64-NEXT:    movl $42, %edi43; X64-NEXT:    callq guide@PLT44; X64-NEXT:    popq %rax45; X64-NEXT:    retq46;47; GISEL-X64-LABEL: test_ubsantrap_custom:48; GISEL-X64:       # %bb.0:49; GISEL-X64-NEXT:    pushq %rax50; GISEL-X64-NEXT:    movl $42, %edi51; GISEL-X64-NEXT:    callq guide52; GISEL-X64-NEXT:    popq %rax53; GISEL-X64-NEXT:    retq54;55; X86-LABEL: test_ubsantrap_custom:56; X86:       # %bb.0:57; X86-NEXT:    subl $12, %esp58; X86-NEXT:    movl $42, (%esp)59; X86-NEXT:    calll guide60; X86-NEXT:    addl $12, %esp61; X86-NEXT:    retl62;63; GISEL-X86-LABEL: test_ubsantrap_custom:64; GISEL-X86:       # %bb.0:65; GISEL-X86-NEXT:    subl $12, %esp66; GISEL-X86-NEXT:    movl $42, (%esp)67; GISEL-X86-NEXT:    calll guide68; GISEL-X86-NEXT:    addl $12, %esp69; GISEL-X86-NEXT:    retl70  call void @llvm.ubsantrap(i8 42) "trap-func-name"="guide"71  ret void72}73