[PATCH] D99699: [AArch64][SVE] Lowering sve.dot to DOT node

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 6 04:48:09 PDT 2021


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:149
+    } else if (auto *Op0 = dyn_cast<ConstantFPSDNode>(N->getOperand(0))) {
+      SplatVal = Op0->getValueAPF().bitcastToAPInt().truncOrSelf(EltSize);
+      return true;
----------------
@junparser This looks a little wired to me.  Specifically the truncOrSelf part which to my mind is never something that is likely safe to do with a floating point constant (even after bitcasting to an APInt).  Looking at the equivalent code in `BuildVectorSDNode::isConstantSplat` I can see that it stops after the `bitcastToAPInt()` stage.  To be consistent, can this function follow the same pattern?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99699



More information about the llvm-commits mailing list