[PATCH] D102672: [ConstantFolding] Use APFloat for constant folding. NFC
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 18 09:48:52 PDT 2021
efriedma added a comment.
It looks like this is just refactoring, besides the changes to the floating-point compares. That's okay, but not really consistent with the commit message; do you have some future work planned?
================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:2146
case LibFunc_logf_finite:
- if (V > 0.0 && TLI->has(Func))
- return ConstantFoldFP(log, V, Ty);
+ if (!APF.isNegative() && !APF.isZero() && TLI->has(Func))
+ return ConstantFoldFP(log, APF, Ty);
----------------
This isn't precisely equivalent to the existing code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102672/new/
https://reviews.llvm.org/D102672
More information about the llvm-commits
mailing list