brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.5 KiB · 4420d04 Raw
189 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 22; RUN: llc < %s -mtriple=i686-linux-gnu -fast-isel | FileCheck %s --check-prefixes=FAST-X863; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel=0 -fast-isel=0 | FileCheck %s --check-prefixes=SDAG-X864; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=GISEL-X865; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -fast-isel | FileCheck %s --check-prefixes=FAST-X646; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -global-isel=0 -fast-isel=0 | FileCheck %s --check-prefixes=SDAG-X647; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=GISEL-X648 9define float @test_powi_f32_i32(float %Val, i32 %x) nounwind {10; FAST-X86-LABEL: test_powi_f32_i32:11; FAST-X86:       # %bb.0:12; FAST-X86-NEXT:    subl $12, %esp13; FAST-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax14; FAST-X86-NEXT:    flds {{[0-9]+}}(%esp)15; FAST-X86-NEXT:    movl %eax, {{[0-9]+}}(%esp)16; FAST-X86-NEXT:    fstps (%esp)17; FAST-X86-NEXT:    calll __powisf218; FAST-X86-NEXT:    addl $12, %esp19; FAST-X86-NEXT:    retl20;21; SDAG-X86-LABEL: test_powi_f32_i32:22; SDAG-X86:       # %bb.0:23; SDAG-X86-NEXT:    subl $12, %esp24; SDAG-X86-NEXT:    flds {{[0-9]+}}(%esp)25; SDAG-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax26; SDAG-X86-NEXT:    movl %eax, {{[0-9]+}}(%esp)27; SDAG-X86-NEXT:    fstps (%esp)28; SDAG-X86-NEXT:    calll __powisf229; SDAG-X86-NEXT:    addl $12, %esp30; SDAG-X86-NEXT:    retl31;32; GISEL-X86-LABEL: test_powi_f32_i32:33; GISEL-X86:       # %bb.0:34; GISEL-X86-NEXT:    subl $12, %esp35; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax36; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx37; GISEL-X86-NEXT:    movl %eax, (%esp)38; GISEL-X86-NEXT:    movl %ecx, {{[0-9]+}}(%esp)39; GISEL-X86-NEXT:    calll __powisf240; GISEL-X86-NEXT:    addl $12, %esp41; GISEL-X86-NEXT:    retl42;43; FAST-X64-LABEL: test_powi_f32_i32:44; FAST-X64:       # %bb.0:45; FAST-X64-NEXT:    pushq %rax46; FAST-X64-NEXT:    callq __powisf2@PLT47; FAST-X64-NEXT:    popq %rax48; FAST-X64-NEXT:    retq49;50; SDAG-X64-LABEL: test_powi_f32_i32:51; SDAG-X64:       # %bb.0:52; SDAG-X64-NEXT:    jmp __powisf2@PLT # TAILCALL53;54; GISEL-X64-LABEL: test_powi_f32_i32:55; GISEL-X64:       # %bb.0:56; GISEL-X64-NEXT:    pushq %rax57; GISEL-X64-NEXT:    callq __powisf258; GISEL-X64-NEXT:    popq %rax59; GISEL-X64-NEXT:    retq60  %res = call float @llvm.powi.f32.i32(float %Val, i32 %x)61  ret float %res62}63 64define double @test_powi_f64_i32(double %Val, i32 %x) nounwind {65; FAST-X86-LABEL: test_powi_f64_i32:66; FAST-X86:       # %bb.0:67; FAST-X86-NEXT:    subl $12, %esp68; FAST-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax69; FAST-X86-NEXT:    fldl {{[0-9]+}}(%esp)70; FAST-X86-NEXT:    movl %eax, {{[0-9]+}}(%esp)71; FAST-X86-NEXT:    fstpl (%esp)72; FAST-X86-NEXT:    calll __powidf273; FAST-X86-NEXT:    addl $12, %esp74; FAST-X86-NEXT:    retl75;76; SDAG-X86-LABEL: test_powi_f64_i32:77; SDAG-X86:       # %bb.0:78; SDAG-X86-NEXT:    subl $12, %esp79; SDAG-X86-NEXT:    fldl {{[0-9]+}}(%esp)80; SDAG-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax81; SDAG-X86-NEXT:    movl %eax, {{[0-9]+}}(%esp)82; SDAG-X86-NEXT:    fstpl (%esp)83; SDAG-X86-NEXT:    calll __powidf284; SDAG-X86-NEXT:    addl $12, %esp85; SDAG-X86-NEXT:    retl86;87; GISEL-X86-LABEL: test_powi_f64_i32:88; GISEL-X86:       # %bb.0:89; GISEL-X86-NEXT:    pushl %esi90; GISEL-X86-NEXT:    subl $24, %esp91; GISEL-X86-NEXT:    leal {{[0-9]+}}(%esp), %eax92; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx93; GISEL-X86-NEXT:    movl 4(%eax), %eax94; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %edx95; GISEL-X86-NEXT:    xorl %esi, %esi96; GISEL-X86-NEXT:    addl %esp, %esi97; GISEL-X86-NEXT:    movl %ecx, (%esp)98; GISEL-X86-NEXT:    movl %eax, 4(%esi)99; GISEL-X86-NEXT:    movl %edx, {{[0-9]+}}(%esp)100; GISEL-X86-NEXT:    calll __powidf2101; GISEL-X86-NEXT:    addl $24, %esp102; GISEL-X86-NEXT:    popl %esi103; GISEL-X86-NEXT:    retl104;105; FAST-X64-LABEL: test_powi_f64_i32:106; FAST-X64:       # %bb.0:107; FAST-X64-NEXT:    pushq %rax108; FAST-X64-NEXT:    callq __powidf2@PLT109; FAST-X64-NEXT:    popq %rax110; FAST-X64-NEXT:    retq111;112; SDAG-X64-LABEL: test_powi_f64_i32:113; SDAG-X64:       # %bb.0:114; SDAG-X64-NEXT:    jmp __powidf2@PLT # TAILCALL115;116; GISEL-X64-LABEL: test_powi_f64_i32:117; GISEL-X64:       # %bb.0:118; GISEL-X64-NEXT:    pushq %rax119; GISEL-X64-NEXT:    callq __powidf2120; GISEL-X64-NEXT:    popq %rax121; GISEL-X64-NEXT:    retq122  %res = call double @llvm.powi.f64.i32(double %Val, i32 %x)123  ret double %res124}125 126define x86_fp80 @test_powi_f80_i32(x86_fp80 %Val, i32 %x) nounwind {127; FAST-X86-LABEL: test_powi_f80_i32:128; FAST-X86:       # %bb.0:129; FAST-X86-NEXT:    subl $28, %esp130; FAST-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax131; FAST-X86-NEXT:    fldt {{[0-9]+}}(%esp)132; FAST-X86-NEXT:    movl %eax, {{[0-9]+}}(%esp)133; FAST-X86-NEXT:    fstpt (%esp)134; FAST-X86-NEXT:    calll __powixf2135; FAST-X86-NEXT:    addl $28, %esp136; FAST-X86-NEXT:    retl137;138; SDAG-X86-LABEL: test_powi_f80_i32:139; SDAG-X86:       # %bb.0:140; SDAG-X86-NEXT:    subl $28, %esp141; SDAG-X86-NEXT:    fldt {{[0-9]+}}(%esp)142; SDAG-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax143; SDAG-X86-NEXT:    movl %eax, {{[0-9]+}}(%esp)144; SDAG-X86-NEXT:    fstpt (%esp)145; SDAG-X86-NEXT:    calll __powixf2146; SDAG-X86-NEXT:    addl $28, %esp147; SDAG-X86-NEXT:    retl148;149; GISEL-X86-LABEL: test_powi_f80_i32:150; GISEL-X86:       # %bb.0:151; GISEL-X86-NEXT:    subl $28, %esp152; GISEL-X86-NEXT:    fldt {{[0-9]+}}(%esp)153; GISEL-X86-NEXT:    movl {{[0-9]+}}(%esp), %eax154; GISEL-X86-NEXT:    fstpt (%esp)155; GISEL-X86-NEXT:    movl %eax, {{[0-9]+}}(%esp)156; GISEL-X86-NEXT:    calll __powixf2157; GISEL-X86-NEXT:    addl $28, %esp158; GISEL-X86-NEXT:    retl159;160; FAST-X64-LABEL: test_powi_f80_i32:161; FAST-X64:       # %bb.0:162; FAST-X64-NEXT:    subq $24, %rsp163; FAST-X64-NEXT:    fldt {{[0-9]+}}(%rsp)164; FAST-X64-NEXT:    fstpt (%rsp)165; FAST-X64-NEXT:    callq __powixf2@PLT166; FAST-X64-NEXT:    addq $24, %rsp167; FAST-X64-NEXT:    retq168;169; SDAG-X64-LABEL: test_powi_f80_i32:170; SDAG-X64:       # %bb.0:171; SDAG-X64-NEXT:    subq $24, %rsp172; SDAG-X64-NEXT:    fldt {{[0-9]+}}(%rsp)173; SDAG-X64-NEXT:    fstpt (%rsp)174; SDAG-X64-NEXT:    callq __powixf2@PLT175; SDAG-X64-NEXT:    addq $24, %rsp176; SDAG-X64-NEXT:    retq177;178; GISEL-X64-LABEL: test_powi_f80_i32:179; GISEL-X64:       # %bb.0:180; GISEL-X64-NEXT:    subq $24, %rsp181; GISEL-X64-NEXT:    fldt {{[0-9]+}}(%rsp)182; GISEL-X64-NEXT:    fstpt (%rsp)183; GISEL-X64-NEXT:    callq __powixf2184; GISEL-X64-NEXT:    addq $24, %rsp185; GISEL-X64-NEXT:    retq186  %res = call x86_fp80 @llvm.powi.f80.i32(x86_fp80 %Val, i32 %x)187  ret x86_fp80 %res188}189