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

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 04:06:25 PST 2019


uweigand added a comment.

> There are some tests fail on SystemZ and I simply transferred
>  thoses testcases which operations are not legal to a new file.

I don't believe those tests ought to fail.  They're all cases where a FP operation is implemented via a library call.  Those should be fine for strict FP semantics, so we should get this even with -disable-strictnode-mutation.

I think the option should only disable the call to mutateStrictFPToFP in SelectionDAGISel.  The calls in SelectionDAGLegalize::ExpandFPLibCall and SelectionDAGLegalize::ExpandArgFPLibCall are fine IMO.

However, I think the option should in addition disable the special handling of strict FP operations in SelectionDAGLegalize::ExpandNode.  Those are only valid because the code expects the mutateStrictFPToFP call to happen in SelectionDAGISel.  If this won't happen, the special handling during Expand shouldn't happen either.

Also, I think it would be nice if a target could default to having -disable-strictnode-mutation always on.  We'd want to do that on SystemZ.  (Then you wouldn't have to change all the test cases either.)


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

https://reviews.llvm.org/D70226





More information about the llvm-commits mailing list