diff options
author | Craig Topper <craig.topper@intel.com> | 2019-09-02 20:16:30 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2019-09-02 20:16:30 +0000 |
commit | 45cd1851097c61b7eee73b93fee4f09fc2a57d3c (patch) | |
tree | f064177a259e0077b38d7db947253fe8a5a44897 /llvm/test/CodeGen/X86/vec_fp_to_int.ll | |
parent | a5fd8d8f47d761a9307696987191bb87f9c06d9e (diff) | |
download | bcm5719-llvm-45cd1851097c61b7eee73b93fee4f09fc2a57d3c.tar.gz bcm5719-llvm-45cd1851097c61b7eee73b93fee4f09fc2a57d3c.zip |
[X86] Enable fp128 as a legal type with SSE1 rather than with MMX.
FP128 values are passed in xmm registers so should be asssociated
with an SSE feature rather than MMX which uses a different set
of registers.
llc enables sse1 and sse2 by default with x86_64. But does not
enable mmx. Clang enables all 3 features by default.
I've tried to add command lines to test with -sse
where possible, but any test that returns a value in an xmm
register fails with a fatal error with -sse since we have no
defined ABI for that scenario.
llvm-svn: 370682
Diffstat (limited to 'llvm/test/CodeGen/X86/vec_fp_to_int.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/vec_fp_to_int.ll | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/llvm/test/CodeGen/X86/vec_fp_to_int.ll b/llvm/test/CodeGen/X86/vec_fp_to_int.ll index b408651e574..fc3233327a5 100644 --- a/llvm/test/CodeGen/X86/vec_fp_to_int.ll +++ b/llvm/test/CodeGen/X86/vec_fp_to_int.ll @@ -2259,44 +2259,36 @@ define <4 x i32> @fptosi_2f80_to_4i32(<2 x x86_fp80> %a) nounwind { define <4 x i32> @fptosi_2f128_to_4i32(<2 x fp128> %a) nounwind { ; SSE-LABEL: fptosi_2f128_to_4i32: ; SSE: # %bb.0: -; SSE-NEXT: pushq %rbp -; SSE-NEXT: pushq %r14 ; SSE-NEXT: pushq %rbx -; SSE-NEXT: movq %rcx, %r14 -; SSE-NEXT: movq %rdx, %rbx +; SSE-NEXT: subq $16, %rsp +; SSE-NEXT: movaps %xmm1, (%rsp) # 16-byte Spill ; SSE-NEXT: callq __fixtfsi -; SSE-NEXT: movl %eax, %ebp -; SSE-NEXT: movq %rbx, %rdi -; SSE-NEXT: movq %r14, %rsi +; SSE-NEXT: movl %eax, %ebx +; SSE-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload ; SSE-NEXT: callq __fixtfsi ; SSE-NEXT: movd %eax, %xmm0 -; SSE-NEXT: movd %ebp, %xmm1 +; SSE-NEXT: movd %ebx, %xmm1 ; SSE-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] ; SSE-NEXT: movq {{.*#+}} xmm0 = xmm1[0],zero +; SSE-NEXT: addq $16, %rsp ; SSE-NEXT: popq %rbx -; SSE-NEXT: popq %r14 -; SSE-NEXT: popq %rbp ; SSE-NEXT: retq ; ; AVX-LABEL: fptosi_2f128_to_4i32: ; AVX: # %bb.0: -; AVX-NEXT: pushq %rbp -; AVX-NEXT: pushq %r14 ; AVX-NEXT: pushq %rbx -; AVX-NEXT: movq %rcx, %r14 -; AVX-NEXT: movq %rdx, %rbx +; AVX-NEXT: subq $16, %rsp +; AVX-NEXT: vmovaps %xmm1, (%rsp) # 16-byte Spill ; AVX-NEXT: callq __fixtfsi -; AVX-NEXT: movl %eax, %ebp -; AVX-NEXT: movq %rbx, %rdi -; AVX-NEXT: movq %r14, %rsi +; AVX-NEXT: movl %eax, %ebx +; AVX-NEXT: vmovaps (%rsp), %xmm0 # 16-byte Reload ; AVX-NEXT: callq __fixtfsi ; AVX-NEXT: vmovd %eax, %xmm0 -; AVX-NEXT: vmovd %ebp, %xmm1 +; AVX-NEXT: vmovd %ebx, %xmm1 ; AVX-NEXT: vpunpckldq {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] ; AVX-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero +; AVX-NEXT: addq $16, %rsp ; AVX-NEXT: popq %rbx -; AVX-NEXT: popq %r14 -; AVX-NEXT: popq %rbp ; AVX-NEXT: retq %cvt = fptosi <2 x fp128> %a to <2 x i32> %ext = shufflevector <2 x i32> %cvt, <2 x i32> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3> |