brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · bf3967c Raw
73 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-unknown-linux-gnu | FileCheck %s --check-prefix=X863; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s --check-prefix=X644 5define i32 @fn(i32 %a0, i32 %a1) {6; X86-LABEL: fn:7; X86:       # %bb.0: # %entry8; X86-NEXT:    pushl %ebx9; X86-NEXT:    .cfi_def_cfa_offset 810; X86-NEXT:    .cfi_offset %ebx, -811; X86-NEXT:    xorl %eax, %eax12; X86-NEXT:    cmpl $1, {{[0-9]+}}(%esp)13; X86-NEXT:    sete %cl14; X86-NEXT:    setne %al15; X86-NEXT:    cmpl $1, {{[0-9]+}}(%esp)16; X86-NEXT:    sete %dl17; X86-NEXT:    negl %eax18; X86-NEXT:    addb %cl, %cl19; X86-NEXT:    movl %eax, %ebx20; X86-NEXT:    shll %cl, %ebx21; X86-NEXT:    addb %dl, %dl22; X86-NEXT:    movl %edx, %ecx23; X86-NEXT:    shll %cl, %eax24; X86-NEXT:    .p2align 425; X86-NEXT:  .LBB0_1: # %bb126; X86-NEXT:    # =>This Inner Loop Header: Depth=127; X86-NEXT:    testl %ebx, %ebx28; X86-NEXT:    je .LBB0_129; X86-NEXT:  # %bb.2: # %bb230; X86-NEXT:    popl %ebx31; X86-NEXT:    .cfi_def_cfa_offset 432; X86-NEXT:    retl33;34; X64-LABEL: fn:35; X64:       # %bb.0: # %entry36; X64-NEXT:    xorl %eax, %eax37; X64-NEXT:    cmpl $1, %edi38; X64-NEXT:    sete %cl39; X64-NEXT:    setne %al40; X64-NEXT:    cmpl $1, %esi41; X64-NEXT:    sete %dl42; X64-NEXT:    negl %eax43; X64-NEXT:    addb %cl, %cl44; X64-NEXT:    movl %eax, %esi45; X64-NEXT:    shll %cl, %esi46; X64-NEXT:    addb %dl, %dl47; X64-NEXT:    movl %edx, %ecx48; X64-NEXT:    shll %cl, %eax49; X64-NEXT:    .p2align 450; X64-NEXT:  .LBB0_1: # %bb151; X64-NEXT:    # =>This Inner Loop Header: Depth=152; X64-NEXT:    testl %esi, %esi53; X64-NEXT:    je .LBB0_154; X64-NEXT:  # %bb.2: # %bb255; X64-NEXT:    retq56entry:57  %cmp1 = icmp ne i32 %a0, 158  %cmp2 = icmp eq i32 %a1, 159  %sel1 = select i1 %cmp1, i32 0, i32 260  %sel2 = select i1 %cmp2, i32 2, i32 061  %sext = sext i1 %cmp1 to i3262  %shl1 = shl i32 %sext, %sel163  %shl2 = shl i32 %sext, %sel264  %tobool = icmp eq i32 %shl1, 065  br label %bb166 67bb1:                                              ; preds = %bb1, %entry68  br i1 %tobool, label %bb1, label %bb269 70bb2:                                              ; preds = %bb171  ret i32 %shl272}73