brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · b0589ff Raw
90 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -verify-machineinstrs < %s -mtriple=i686-unknown-unknown -mattr=+rtm | FileCheck %s --check-prefix=X863; RUN: llc -verify-machineinstrs < %s -mtriple=x86_64-unknown-unknown -mattr=+rtm | FileCheck %s --check-prefix=X644 5declare i32 @llvm.x86.xbegin() nounwind6declare void @llvm.x86.xend() nounwind7declare void @llvm.x86.xabort(i8) nounwind8declare void @f1()9 10define i32 @test_xbegin() nounwind uwtable {11; X86-LABEL: test_xbegin:12; X86:       # %bb.0: # %entry13; X86-NEXT:    xbegin .LBB0_214; X86-NEXT:  # %bb.1: # %entry15; X86-NEXT:    movl $-1, %eax16; X86-NEXT:    retl17; X86-NEXT:  .LBB0_2: # %entry18; X86-NEXT:    # XABORT DEF19; X86-NEXT:    retl20;21; X64-LABEL: test_xbegin:22; X64:       # %bb.0: # %entry23; X64-NEXT:    xbegin .LBB0_224; X64-NEXT:  # %bb.1: # %entry25; X64-NEXT:    movl $-1, %eax26; X64-NEXT:    retq27; X64-NEXT:  .LBB0_2: # %entry28; X64-NEXT:    # XABORT DEF29; X64-NEXT:    retq30entry:31  %0 = tail call i32 @llvm.x86.xbegin() nounwind32  ret i32 %033}34 35define void @test_xend() nounwind uwtable {36; X86-LABEL: test_xend:37; X86:       # %bb.0: # %entry38; X86-NEXT:    xend39; X86-NEXT:    retl40;41; X64-LABEL: test_xend:42; X64:       # %bb.0: # %entry43; X64-NEXT:    xend44; X64-NEXT:    retq45entry:46  tail call void @llvm.x86.xend() nounwind47  ret void48}49 50define void @test_xabort() nounwind uwtable {51; X86-LABEL: test_xabort:52; X86:       # %bb.0: # %entry53; X86-NEXT:    xabort $254; X86-NEXT:    retl55;56; X64-LABEL: test_xabort:57; X64:       # %bb.0: # %entry58; X64-NEXT:    xabort $259; X64-NEXT:    retq60entry:61  tail call void @llvm.x86.xabort(i8 2)62  ret void63}64 65define void @f2(i32 %x) nounwind uwtable {66; X86-LABEL: f2:67; X86:       # %bb.0: # %entry68; X86-NEXT:    xabort $169; X86-NEXT:    calll f1@PLT70; X86-NEXT:    retl71;72; X64-LABEL: f2:73; X64:       # %bb.0: # %entry74; X64-NEXT:    pushq %rax75; X64-NEXT:    .cfi_def_cfa_offset 1676; X64-NEXT:    movl %edi, {{[0-9]+}}(%rsp)77; X64-NEXT:    xabort $178; X64-NEXT:    callq f1@PLT79; X64-NEXT:    popq %rax80; X64-NEXT:    .cfi_def_cfa_offset 881; X64-NEXT:    retq82entry:83  %x.addr = alloca i32, align 484  store i32 %x, ptr %x.addr, align 485  call void @llvm.x86.xabort(i8 1)86  call void @f1()87  ret void88}89 90