[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
Mon Jan 10 01:03:15 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();
----------------
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.


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