[PATCH] D67721: [InstSimplify] fold fma/fmuladd with a NaN operand

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 04:23:27 PDT 2019


spatel added a comment.

In D67721#1674583 <https://reviews.llvm.org/D67721#1674583>, @fhahn wrote:

>   D67553 adds `SimplifyFMAMul`. We should probably also have them there. Also, could we make use of multiply by 0.0 here, with the required fast-math flags?


Yes, these patches should converge somehow. That's partly why I only put the NaN folding in this one, but if you think it's better to wait for the other patches to land, that's fine with me.
I think we'll end up modifying D67351 <https://reviews.llvm.org/D67351> - if we can fold fma(a,0,b) --> b, then we want that to happen in InstSimplify directly rather than InstCombine because it's more efficient that way.


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

https://reviews.llvm.org/D67721





More information about the llvm-commits mailing list