brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · 804b5c1 Raw
79 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+tbm,+cmov | FileCheck %s --check-prefix=X863; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+tbm | FileCheck %s --check-prefix=X644 5define i32 @test_x86_tbm_bextri_u32(i32 %a) nounwind readnone {6; X86-LABEL: test_x86_tbm_bextri_u32:7; X86:       # %bb.0: # %entry8; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax9; X86-NEXT:    addl %eax, %eax10; X86-NEXT:    bextrl $3841, %eax, %eax # imm = 0xF0111; X86-NEXT:    retl12;13; X64-LABEL: test_x86_tbm_bextri_u32:14; X64:       # %bb.0: # %entry15; X64-NEXT:    addl %edi, %edi16; X64-NEXT:    bextrl $3841, %edi, %eax # imm = 0xF0117; X64-NEXT:    retq18entry:19  %0 = add i32 %a, %a20  %1 = tail call i32 @llvm.x86.tbm.bextri.u32(i32 %0, i32 3841)21  ret i32 %122}23 24declare i32 @llvm.x86.tbm.bextri.u32(i32, i32) nounwind readnone25 26define i32 @test_x86_tbm_bextri_u32_m(ptr nocapture %a) nounwind readonly {27; X86-LABEL: test_x86_tbm_bextri_u32_m:28; X86:       # %bb.0: # %entry29; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax30; X86-NEXT:    bextrl $3841, (%eax), %eax # imm = 0xF0131; X86-NEXT:    retl32;33; X64-LABEL: test_x86_tbm_bextri_u32_m:34; X64:       # %bb.0: # %entry35; X64-NEXT:    bextrl $3841, (%rdi), %eax # imm = 0xF0136; X64-NEXT:    retq37entry:38  %tmp1 = load i32, ptr %a, align 439  %0 = tail call i32 @llvm.x86.tbm.bextri.u32(i32 %tmp1, i32 3841)40  ret i32 %041}42 43define i32 @test_x86_tbm_bextri_u32_z(i32 %a, i32 %b) nounwind readonly {44; X86-LABEL: test_x86_tbm_bextri_u32_z:45; X86:       # %bb.0: # %entry46; X86-NEXT:    bextrl $3841, {{[0-9]+}}(%esp), %eax # imm = 0xF0147; X86-NEXT:    jne .LBB2_248; X86-NEXT:  # %bb.1: # %entry49; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax50; X86-NEXT:  .LBB2_2: # %entry51; X86-NEXT:    retl52;53; X64-LABEL: test_x86_tbm_bextri_u32_z:54; X64:       # %bb.0: # %entry55; X64-NEXT:    bextrl $3841, %edi, %eax # imm = 0xF0156; X64-NEXT:    cmovel %esi, %eax57; X64-NEXT:    retq58entry:59  %0 = tail call i32 @llvm.x86.tbm.bextri.u32(i32 %a, i32 3841)60  %1 = icmp eq i32 %0, 061  %2 = select i1 %1, i32 %b, i32 %062  ret i32 %263}64 65define i32 @test_x86_tbm_bextri_demandedbits(i32 %x) nounwind readonly {66; X86-LABEL: test_x86_tbm_bextri_demandedbits:67; X86:       # %bb.0:68; X86-NEXT:    bextrl $3841, {{[0-9]+}}(%esp), %eax # imm = 0xF0169; X86-NEXT:    retl70;71; X64-LABEL: test_x86_tbm_bextri_demandedbits:72; X64:       # %bb.0:73; X64-NEXT:    bextrl $3841, %edi, %eax # imm = 0xF0174; X64-NEXT:    retq75  %a = or i32 %x, 429490176176  %b = tail call i32 @llvm.x86.tbm.bextri.u32(i32 %a, i32 3841)77  ret i32 %b78}79