[PATCH] D61331: [SelectionDAG] remove constant folding limitations based on FP exceptions

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 13:49:21 PDT 2019


andrew.w.kaylor added a comment.

In D61331#1485000 <https://reviews.llvm.org/D61331#1485000>, @efriedma wrote:

> We generally try to avoid keeping dead code in-tree, but I guess I'm not strongly opposed to it here.


I honestly don't have strong feelings about this particular change either. I'm more concerned about the way we think about strict FP handling.  We've still got a lot of work to do to finish strict FP handling, and I would hate to see any code that currently has logic to handle strict exception semantics lose it. On the other hand, looking closer at the current code, I see that the logic there today isn't actually correct for strict exception semantics. So I guess if we decide to go with my suggestion then every place that's currently checking "Status != APFloat::opInvalidOp" should really be checking "Status == APFloat::opOK".

BTW, in addition to what Craig pointed out above with regard to the chain, he visited me and mentioned additional complications related to the fact that we aren't keeping the rounding mode and exception semantics in the DAG. We really need a way to fix that. I'm inclined to believe constant folding will still end up going through this function, but it'll be more work to get here than I realized.


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

https://reviews.llvm.org/D61331





More information about the llvm-commits mailing list