[PATCH] D69777: [ConstantFolding] Fold calls to FP remainder function

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 11:35:32 PST 2019


arsenm added inline comments.


================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:2103
+          APFloat V = Op1->getValueAPF();
+          if (APFloat::opStatus::opOK == V.remainder(Op2->getValueAPF()))
+            return ConstantFP::get(Ty->getContext(), V);
----------------
ekatz wrote:
> arsenm wrote:
> > Backwards condition
> Wanted to be consistent with the coding style on that particular file. See line 2095.
> If I change this, should I also change it for "mod()" as well?
I would say change this, and leave the unrelated part alone


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

https://reviews.llvm.org/D69777





More information about the llvm-commits mailing list