41 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc -mtriple=i386-pc-win32 < %s | FileCheck -check-prefix=WIN32 %s3; RUN: llc -mtriple=x86_64-unknown-unknown < %s | FileCheck -check-prefixes=X64 %s4 5; On 32-bit windows this should be promoted to a call to modf (not modff).6define { float, float } @test_modf_f32(float %a) {7; WIN32-LABEL: test_modf_f32:8; WIN32: # %bb.0:9; WIN32-NEXT: pushl %ebp10; WIN32-NEXT: movl %esp, %ebp11; WIN32-NEXT: andl $-8, %esp12; WIN32-NEXT: subl $32, %esp13; WIN32-NEXT: leal {{[0-9]+}}(%esp), %eax14; WIN32-NEXT: movl %eax, {{[0-9]+}}(%esp)15; WIN32-NEXT: flds 8(%ebp)16; WIN32-NEXT: fstpl (%esp)17; WIN32-NEXT: calll _modf18; WIN32-NEXT: fstps {{[0-9]+}}(%esp)19; WIN32-NEXT: fldl {{[0-9]+}}(%esp)20; WIN32-NEXT: fstps {{[0-9]+}}(%esp)21; WIN32-NEXT: flds {{[0-9]+}}(%esp)22; WIN32-NEXT: flds {{[0-9]+}}(%esp)23; WIN32-NEXT: fxch %st(1)24; WIN32-NEXT: movl %ebp, %esp25; WIN32-NEXT: popl %ebp26; WIN32-NEXT: retl27;28; X64-LABEL: test_modf_f32:29; X64: # %bb.0:30; X64-NEXT: pushq %rax31; X64-NEXT: .cfi_def_cfa_offset 1632; X64-NEXT: leaq {{[0-9]+}}(%rsp), %rdi33; X64-NEXT: callq modff@PLT34; X64-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero35; X64-NEXT: popq %rax36; X64-NEXT: .cfi_def_cfa_offset 837; X64-NEXT: retq38 %result = call { float, float } @llvm.modf.f32(float %a)39 ret { float, float } %result40}41