[PATCH] D65399: [InstCombine] canonicalize fneg before fmul/fdiv

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 10:58:58 PDT 2019


spatel added a comment.

In D65399#1604816 <https://reviews.llvm.org/D65399#1604816>, @mcberg2017 wrote:

> General comment: For us internally at Apple this does cause regressions, its small but there.   Mostly because fneg becomes a side effect for fp arithmetic ops for us.  I would request a target info guard which we can turn off to avoid the drift.  If not, this is small enough to live with.


This is target-independent instcombine, so I don't think we want to add hooks at this level. If you see regressions transforming in this direction, do you also see regressions from the current code (ie, does disabling all fneg transforms make things even better)? That would suggest that we remove these transforms from instcombine altogether and create a dedicated target-dependent IR pass for fneg folds that behaves more like what we have in DAGCombiner.


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

https://reviews.llvm.org/D65399





More information about the llvm-commits mailing list