[PATCH] D154735: ValueTracking: ldexp cannot return denormals based on range of exponent
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 11 03:57:57 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4714
+ const APInt *ConstVal = ExpRange.getSingleElement();
+ if (ConstVal && ConstVal->isZero()) {
// ldexp(x, 0) -> x, so propagate everything.
----------------
foad wrote:
> Why do you have to handle this case here? Surely something else should already have simplified the operand to an actual constant?
D149587 folds these out. However, these ValueTracking functions tend to try to handle all the edge cases. Some of those trivial folds are implemented with these functions (e.g. D151887 tries to consolidate the fcmp simplifications to use computeKnownFPClass)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154735/new/
https://reviews.llvm.org/D154735
More information about the llvm-commits
mailing list