[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:19:35 PST 2023


craig.topper added a comment.

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

> In D141074#4037854 <https://reviews.llvm.org/D141074#4037854>, @lebedev.ri wrote:
>
>> 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. What I meant was to just use the x87 implementation and print a warning in this case.
>>
>> Why are they unavoidable?
>
> As long as the precision control is low, x87 has low precision.

If the precision control is set to more than 24-bit precision, x87 actually has more precision than SSE for fp32.


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

https://reviews.llvm.org/D141074



More information about the llvm-commits mailing list