[PATCH] D148544: ValueTracking: Handle fptrunc_round in computeKnownFPClass

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 02:14:00 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:4078
+  KnownFPClass KnownSrc;
+  computeKnownFPClass(Op->getOperand(0), DemandedElts, InterestedClasses,
+                      KnownSrc, Depth + 1, Q, TLI);
----------------
I think there might be subtle bugs lurking in the way you pass InterestedClasses into recursive calls. E.g if InterestedClasses was fcQNan here, and the recursive call returned fcNone, you would conclude the operand is not nan - but in reality it could still be snan.

If I'm right that that's a bug then you could fix this case by passing fcNan into the recursive call.

Anyway this is pre-existing.


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

https://reviews.llvm.org/D148544



More information about the llvm-commits mailing list