brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.8 KiB · 1aca8d1 Raw
117 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -global-isel=0                    -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=X643; RUN: llc < %s -fast-isel -fast-isel-abort=1     -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=X644; RUN: llc < %s -global-isel -global-isel-abort=1 -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=X645; RUN: llc < %s -global-isel=0                    -mtriple=i686-linux-gnu | FileCheck %s --check-prefixes=X86,DAG-X866; RUN: llc < %s -fast-isel -fast-isel-abort=1     -mtriple=i686-linux-gnu | FileCheck %s --check-prefixes=X86,DAG-X867; RUN: llc < %s -global-isel -global-isel-abort=1 -mtriple=i686-linux-gnu | FileCheck %s --check-prefixes=X86,GISEL-X868 9define i8 @test_sdiv_i8(i8 %arg1, i8 %arg2) nounwind {10; X64-LABEL: test_sdiv_i8:11; X64:       # %bb.0:12; X64-NEXT:    movsbl %dil, %eax13; X64-NEXT:    idivb %sil14; X64-NEXT:    retq15;16; DAG-X86-LABEL: test_sdiv_i8:17; DAG-X86:       # %bb.0:18; DAG-X86-NEXT:    movsbl {{[0-9]+}}(%esp), %eax19; DAG-X86-NEXT:    idivb {{[0-9]+}}(%esp)20; DAG-X86-NEXT:    retl21;22; GISEL-X86-LABEL: test_sdiv_i8:23; GISEL-X86:       # %bb.0:24; GISEL-X86-NEXT:    movzbl {{[0-9]+}}(%esp), %eax25; GISEL-X86-NEXT:    cbtw26; GISEL-X86-NEXT:    movzbl {{[0-9]+}}(%esp), %ecx27; GISEL-X86-NEXT:    idivb %cl28; GISEL-X86-NEXT:    retl29  %ret = sdiv i8 %arg1, %arg230  ret i8 %ret31}32 33define i16 @test_sdiv_i16(i16 %arg1, i16 %arg2) nounwind {34; X64-LABEL: test_sdiv_i16:35; X64:       # %bb.0:36; X64-NEXT:    movl %edi, %eax37; X64-NEXT:    # kill: def $ax killed $ax killed $eax38; X64-NEXT:    cwtd39; X64-NEXT:    idivw %si40; X64-NEXT:    retq41;42; DAG-X86-LABEL: test_sdiv_i16:43; DAG-X86:       # %bb.0:44; DAG-X86-NEXT:    movzwl {{[0-9]+}}(%esp), %eax45; DAG-X86-NEXT:    cwtd46; DAG-X86-NEXT:    idivw {{[0-9]+}}(%esp)47; DAG-X86-NEXT:    retl48;49; GISEL-X86-LABEL: test_sdiv_i16:50; GISEL-X86:       # %bb.0:51; GISEL-X86-NEXT:    movzwl {{[0-9]+}}(%esp), %eax52; GISEL-X86-NEXT:    movzwl {{[0-9]+}}(%esp), %ecx53; GISEL-X86-NEXT:    # kill: def $ax killed $ax killed $eax54; GISEL-X86-NEXT:    cwtd55; GISEL-X86-NEXT:    idivw %cx56; GISEL-X86-NEXT:    retl57  %ret = sdiv i16 %arg1, %arg258  ret i16 %ret59}60 61define i32 @test_sdiv_i32(i32 %arg1, i32 %arg2) nounwind {62; X64-LABEL: test_sdiv_i32:63; X64:       # %bb.0:64; X64-NEXT:    movl %edi, %eax65; X64-NEXT:    cltd66; X64-NEXT:    idivl %esi67; X64-NEXT:    retq68;69; X86-LABEL: test_sdiv_i32:70; X86:       # %bb.0:71; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax72; X86-NEXT:    cltd73; X86-NEXT:    idivl {{[0-9]+}}(%esp)74; X86-NEXT:    retl75  %ret = sdiv i32 %arg1, %arg276  ret i32 %ret77}78 79define i64 @test_sdiv_i64(i64 %arg1, i64 %arg2) nounwind {80; X64-LABEL: test_sdiv_i64:81; X64:       # %bb.0:82; X64-NEXT:    movq %rdi, %rax83; X64-NEXT:    cqto84; X64-NEXT:    idivq %rsi85; X64-NEXT:    retq86;87; DAG-X86-LABEL: test_sdiv_i64:88; DAG-X86:       # %bb.0:89; DAG-X86-NEXT:    subl $12, %esp90; DAG-X86-NEXT:    pushl {{[0-9]+}}(%esp)91; DAG-X86-NEXT:    pushl {{[0-9]+}}(%esp)92; DAG-X86-NEXT:    pushl {{[0-9]+}}(%esp)93; DAG-X86-NEXT:    pushl {{[0-9]+}}(%esp)94; DAG-X86-NEXT:    calll __divdi395; DAG-X86-NEXT:    addl $28, %esp96; DAG-X86-NEXT:    retl97;98; GISEL-X86-LABEL: test_sdiv_i64:99; GISEL-X86:       # %bb.0:100; GISEL-X86-NEXT:    pushl %esi101; GISEL-X86-NEXT:    subl $24, %esp102; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax103; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx104; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %edx105; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %esi106; GISEL-X86-NEXT:    movl %eax, (%esp)107; GISEL-X86-NEXT:    movl %ecx, {{[0-9]+}}(%esp)108; GISEL-X86-NEXT:    movl %edx, {{[0-9]+}}(%esp)109; GISEL-X86-NEXT:    movl %esi, {{[0-9]+}}(%esp)110; GISEL-X86-NEXT:    calll __divdi3111; GISEL-X86-NEXT:    addl $24, %esp112; GISEL-X86-NEXT:    popl %esi113; GISEL-X86-NEXT:    retl114  %ret = sdiv i64 %arg1, %arg2115  ret i64 %ret116}117