[PATCH] D147902: ValueTracking: Implement computeKnownFPClass for fpext

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 15:10:25 PDT 2023


arsenm marked an inline comment as done.
arsenm 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))
----------------
jcranmer-intel wrote:
> 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.
I missed fltSemantics::isRepresentableBy (don't understand why fltSemantics is treated so opaquely)


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

https://reviews.llvm.org/D147902



More information about the llvm-commits mailing list