[PATCH] D148549: ValueTracking: Implement computeKnownFPClass for log

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 06:04:13 PDT 2023


foad accepted this revision.
foad added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4511
+          InterestedSrcs |= fcZero | fcSubnormal;
+
+        KnownFPClass KnownSrc;
----------------
If InterestedClasses includes any nan, InterestedSrcs should include fcNan and the ordered-less-than-zero stuff.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4390
+        computeKnownFPClass(II->getArgOperand(0), DemandedElts,
+                            InterestedClasses, KnownSrc, Depth + 1, Q, TLI);
+
----------------
arsenm wrote:
> foad wrote:
> > Blindly propagating InterestedClasses seems wrong again. E.g. if InterestedClasses contains fcNegInf then the value you pass down should contain fcZero.
> It can't be incorrect, this can only improve precision. It's hard to get these right without relevant queries wired up
> It can't be incorrect, this can only improve precision.
Ack, I get that now.


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

https://reviews.llvm.org/D148549



More information about the llvm-commits mailing list