[PATCH] D88573: [SelectionDAG] Add check for BUILD_VECTOR in isKnownNeverNaN

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 07:56:33 PDT 2020


foad added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4104
 
   // TODO: Handle vectors.
   // If the value is a constant, we can obviously see if it is a NaN or not.
----------------
It looks like you're adding new functionality, so update the comment in SelectionDAG.h to explain that this function now handles vectors and what the behaviour is?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4203
+  case ISD::BUILD_VECTOR: {
+    for (unsigned i = 0, NumOp = Op.getNumOperands(); i < NumOp; ++i)
+      if (!isKnownNeverNaN(Op.getOperand(i), SNaN, Depth + 1))
----------------
`for (const SDValue &Opnd : Op->ops())` ?


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

https://reviews.llvm.org/D88573



More information about the llvm-commits mailing list