[PATCH] D67446: [ConstProp] allow folding for fma that produces NaN

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 09:10:07 PDT 2019


reames added inline comments.


================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:2242
+          V.fusedMultiplyAdd(Op2->getValueAPF(), Op3->getValueAPF(),
+                             APFloat::rmNearestTiesToEven);
+          return ConstantFP::get(Ty->getContext(), V);
----------------
Does opInvalidOp always imply Nan?  If so, then the name should be updated or at least clarifying comments added to the APFloat header.  If not, then this code may be incorrect.


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

https://reviews.llvm.org/D67446





More information about the llvm-commits mailing list