[PATCH] D147936: ValueTracking: Handle minimum/maximum in computeKnownFPClass

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 13 16:06:02 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4498
+                            Known2, Depth + 1, Q, TLI);
+        Known |= Known2;
+        break;
----------------
kpn wrote:
> Is this correct? If we know that one operand cannot be NaN, but we don't know that about the other operand, then we can't know if the result of the operation is NaN or not. This is llvm.minimum/llvm.maximum, correct? Those are documented as propagating NaN,
Right, so both operands need to be nnan which is what this accomplishes. The mask is the values it can be, not that it cannot be.


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

https://reviews.llvm.org/D147936



More information about the llvm-commits mailing list