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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 12:16:21 PDT 2019


spatel added a comment.

In D65399#1604944 <https://reviews.llvm.org/D65399#1604944>, @cameron.mcinally wrote:

> > How about we add a TODO comment regarding Cameron's topic? Would that be sufficient?
>
> To be fair, this is a larger open question. There are a number of transforms that may need to be addressed in the future from it.
>
> It's probably fine to submit without a comment.


Thanks for the quick reviews! I agree that there are potential pitfalls in instcombine for targets with FTZ/DAZ. If you grep around in here, you can find some transforms that are partially limited to avoid that, but I can't see how those limitations work in the general case where we don't know some value is a denorm at compile-time. I suspect we need to expand our fast-math-flags and/or use of function attributes to account for targets that are not IEEE-754 compliant even though LLVM IR assumes that model by default.


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

https://reviews.llvm.org/D65399





More information about the llvm-commits mailing list