brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · a8a7da4 Raw
57 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686--| FileCheck %s --check-prefixes=X863; RUN: llc < %s -mtriple=x86_64--| FileCheck %s --check-prefixes=X644 5;6; PR61467;8 9define i32 @cmp_xor_i32(i32 %a, i32 %b, i32 %c)10; X86-LABEL: cmp_xor_i32:11; X86:       # %bb.0:12; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax13; X86-NEXT:    xorl {{[0-9]+}}(%esp), %eax14; X86-NEXT:    jne .LBB0_215; X86-NEXT:  # %bb.1:16; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax17; X86-NEXT:  .LBB0_2:18; X86-NEXT:    retl19;20; X64-LABEL: cmp_xor_i32:21; X64:       # %bb.0:22; X64-NEXT:    movl %edi, %eax23; X64-NEXT:    xorl %esi, %eax24; X64-NEXT:    cmovel %edx, %eax25; X64-NEXT:    retq26{27  %xor = xor i32 %a, %b28  %cmp = icmp eq i32 %a, %b29  %sel = select i1 %cmp, i32 %c, i32 %xor30  ret i32 %sel31}32 33define i32 @cmp_xor_i32_commute(i32 %a, i32 %b, i32 %c)34; X86-LABEL: cmp_xor_i32_commute:35; X86:       # %bb.0:36; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax37; X86-NEXT:    xorl {{[0-9]+}}(%esp), %eax38; X86-NEXT:    jne .LBB1_239; X86-NEXT:  # %bb.1:40; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax41; X86-NEXT:  .LBB1_2:42; X86-NEXT:    retl43;44; X64-LABEL: cmp_xor_i32_commute:45; X64:       # %bb.0:46; X64-NEXT:    movl %edi, %eax47; X64-NEXT:    xorl %esi, %eax48; X64-NEXT:    cmovel %edx, %eax49; X64-NEXT:    retq50{51  %xor = xor i32 %b, %a52  %cmp = icmp eq i32 %a, %b53  %sel = select i1 %cmp, i32 %c, i32 %xor54  ret i32 %sel55}56 57