[PATCH] D147902: ValueTracking: Implement computeKnownFPClass for fpext
Joshua Cranmer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 14 12:59:09 PDT 2023
jcranmer-intel added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4598-4602
+ // All subnormal inputs should be in the normal range in the result type.
+ if (APFloat::semanticsMinExponent(DstTy) <
+ APFloat::semanticsMinExponent(SrcTy) &&
+ APFloat::semanticsMaxExponent(DstTy) >
+ APFloat::semanticsMaxExponent(SrcTy))
----------------
If the mantissa is sufficiently long, then a subnormal could still be a subnormal in a number with longer range. While this holds true for all the >=16-bit fp types, I'm not sure this holds true for the different FP8 types.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147902/new/
https://reviews.llvm.org/D147902
More information about the llvm-commits
mailing list