[PATCH] D70226: Add an option to disable strict float node mutating to an normal float node

LiuChen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 05:09:59 PST 2019


LiuChen3 marked an inline comment as done.
LiuChen3 added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2668
+    return false;
+  }
+
----------------
uweigand wrote:
> I'm not sure this is always correct, I think it might be possible that a target might want to select Expand for a strict operation even if they use e.g. Custom for the non-strict version (obviously, that would have to be an operation where common code implements an Expand algorithm that respects the constrained FP semantics).
> 
> More importantly, even if you do this, you **still** need to add the checks in STRICT_FP_ROUND and STRICT_FP_EXTEND I mentioned in my earlier comment: note that in those cases, even if the target uses Expand for both the strict and non-strict operation, the code below still cannot be used if isStrictFPEnabled is true (since it does not respect constrained FP semantics).
Thanks. 
I think I misunderstood what you meant before. You actually mean is if the backend has supported strict float, it can never expand STRICT_FP_ROUND and STRICT_FP_EXTEND operations. We don't expand it not because we setOperationAction wrong or something else, because it isn't 'strict float' at all.
I'll only add judgment based on the previous patch and delete this.


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

https://reviews.llvm.org/D70226





More information about the llvm-commits mailing list