[PATCH] D68857: [X86] Add strict fp support for operations of X87 instructions
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 25 20:56:52 PST 2019
craig.topper added a comment.
In D68857#1759727 <https://reviews.llvm.org/D68857#1759727>, @LiuChen3 wrote:
> Rebase.
> STRICT_FP_ROUND has been set as custom so I remove setting it as legal. When entering the custom processing function, if the operand type is legal,the function behaves the same as setOperationAction(ISD:STRICT_FP_ROUND, TYPE, legal)
> Modify the test case. Since we do not disable sse, we can pass float-pointer value by register instead of passing by pointer.
STRICT_FP_ROUND should only be Custom on a 64-bit target. This probably only works because LegalizeDAG bailed out of ExpandNode due to strictfp mutation being disabled. And there is no libcall support for STRICT_FP_ROUND so LegalizeDAG gave up and just left the node alone.
================
Comment at: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:5227
+ // X87 instructions has enabled these strict fp operation.
+ if (!Subtarget->hasSSE1() && Subtarget->hasX87())
+ break;
----------------
craig.topper wrote:
> This isn't the right check for the fp80 operations. They're independent of sse.
For FP_ROUND isn't the input type f80 not the result type?
================
Comment at: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:5235
// nodes.
CurDAG->mutateStrictFPToFP(Node);
break;
----------------
I think this code should also call TLI.isStrictFPEnabled() before doing the mutate.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68857/new/
https://reviews.llvm.org/D68857
More information about the llvm-commits
mailing list