[PATCH] D15946: Optimized instruction sequence for sitofp operation on X86-32
Elena Demikhovsky via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 10 01:37:34 PST 2016
delena marked 2 inline comments as done.
================
Comment at: ../test/CodeGen/X86/scalar-int-to-fp.ll:120-130
@@ -119,2 +119,13 @@
+; CHECK-LABEL: s64_to_d_2
+; SSE2_32: movd %ecx, %xmm0
+; SSE2_32: movd %eax, %xmm1
+; SSE2_32: punpckldq %xmm0, %xmm1
+; SSE2_32: fildll
+define double @s64_to_d_2(i64 %a) nounwind {
+ %b = add i64 %a, 5
+ %f = sitofp i64 %b to double
+ ret double %f
+}
+
; CHECK-LABEL: u64_to_x
----------------
mbodart wrote:
> Rather than creating a new function, it would seem more simple to just add a check for punpckldq, for both SSE2_32 and AVX512_32, in the existing s64_to_d function.
This is the code generated for s64_to_d, because the input parameters are already on stack.
pushl %ebp
movl %esp, %ebp
andl $-8, %esp
subl $8, %esp
fildll 8(%ebp)
fstpl (%esp)
fldl (%esp)
movl %ebp, %esp
popl %ebp
retl
Repository:
rL LLVM
http://reviews.llvm.org/D15946
More information about the llvm-commits
mailing list