[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:17:12 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);
----------------
Backwards condition
================
Comment at: llvm/test/Analysis/ConstantFolding/math-2.ll:31
+}
+
declare double @pow(double, double)
----------------
Should have tests stressing all the handled types , and preferably a few for the special cases , like snan
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69777/new/
https://reviews.llvm.org/D69777
More information about the llvm-commits
mailing list