[PATCH] D141074: [X86] Avoid converting 64-bit integers to floating point using x87 on Windows

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 15:01:47 PST 2023


craig.topper added a comment.

In D141074#4037831 <https://reviews.llvm.org/D141074#4037831>, @icedrocket wrote:

> If SSE2 is available, we only need to use library calls to convert between 64-bit integers and floating point. However, if only x87 is available, precision issues are unavoidable. In this case, it might be better to just use the x87 implementation and print a warning.

Hopefully if you're not using long double, there shouldn't be any major precision issues with x87. The issue with the unsigned conversion is assuming we could represent a 64-bit integer in the mantissa of an x87 register without occurring any rounding.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141074/new/

https://reviews.llvm.org/D141074



More information about the llvm-commits mailing list