[PATCH] D100091: [X86] Fix wrong handle with "-mno-x87"

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 11:35:24 PDT 2021


craig.topper added a comment.

In D100091#2712957 <https://reviews.llvm.org/D100091#2712957>, @andrew.w.kaylor wrote:

> In D100091#2707536 <https://reviews.llvm.org/D100091#2707536>, @LiuChen3 wrote:
>
>>> What is the usage model you’re trying to enable? This has been broken for a long time. Why is it important now?
>>
>> I don't know any specific case for now. This was found by @andrew.w.kaylor. I will check with him.
>
> We have libraries that for performance reasons want to be able to avoid saving and restoring the x87 state and to safely do this, they need to rely on the fact that we won't generate x87 instructions if the compiler is told not to. That's the general motivation. This particular case is an easy contrived case that I came up with to show that the no-x87 option isn't always being respected. I don't think this case matters for our library because it's essentially user error. In theory, the front end code that sets up the ABI conformance could detect this case and report an error. Of course, that means relying on **every** front end to the right thing, so I think it would be better to (also?) reject this in the backend.
>
> Basically, my ultimate goal here is to achieve a robust solution where "no-x87" means no x87 in all circumstances.

Thanks. Is the compiler still allowed to use the xmm registers? Is this needed for 32-bit mode or just 64-bit? Trying to understand how many problems need to be fixed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100091



More information about the llvm-commits mailing list