[PATCH] D116870: [SelectionDAG] Add FP_TO_UINT_SAT/FP_TO_SINT_SAT to computeKnownBits/computeNumSignBits.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 11 00:22:18 PST 2022


foad added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:3588
+  case ISD::FP_TO_UINT_SAT: {
+    // FP_TO_UINT_SAT produces an unsigned value that fits in the saturating VT.
+    EVT VT = cast<VTSDNode>(Op.getOperand(1))->getVT();
----------------
craig.topper wrote:
> foad wrote:
> > Could you also update the comments for FP_TO_[US]INT_SAT in include/llvm/CodeGen/ISDOpcodes.h to document the properties you are relying on here? Currently it says nothing about the value of the bits between the saturating type and the result type.
> Added in 9ef2175f812a9308cbcefc4729f6a6c9e75c2b6f
Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116870



More information about the llvm-commits mailing list