[PATCH] D24343: [X86][SSE] Improve recognition of uitofp conversions that can be performed as sitofp

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 14:08:49 PDT 2016


RKSimon added inline comments.

================
Comment at: test/CodeGen/X86/i64-to-float.ll:91-94
@@ +90,6 @@
+; X32-SSE-NEXT:    movq %xmm0, {{[0-9]+}}(%esp)
+; X32-SSE-NEXT:    fildll {{[0-9]+}}(%esp)
+; X32-SSE-NEXT:    fstpl {{[0-9]+}}(%esp)
+; X32-SSE-NEXT:    fildll {{[0-9]+}}(%esp)
+; X32-SSE-NEXT:    fstpl (%esp)
+; X32-SSE-NEXT:    movsd {{.*#+}} xmm0 = mem[0],zero
----------------
majnemer wrote:
> Was this here before?
The stack spill/restore is a mess but the (f64 sitofp(i64)) fpu approach appears to be the better performing option on 32-bit targets.

Its also what gcc / icc does: https://godbolt.org/g/CMPJrA


Repository:
  rL LLVM

https://reviews.llvm.org/D24343





More information about the llvm-commits mailing list