[PATCH] D102501: [CodeGen] Add support for widening INSERT_SUBVECTOR operands

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 03:48:08 PDT 2021


david-arm added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:4839
+SDValue DAGTypeLegalizer::WidenVecOp_INSERT_SUBVECTOR(SDNode *N) {
+  ConstantSDNode *CstIdx = dyn_cast<ConstantSDNode>(N->getOperand(2));
+  bool IsZeroIdx = CstIdx && CstIdx->isNullValue();
----------------
frasercrmck wrote:
> The index operand is required to be a constant. Perhaps we can be stricter here?
Ah ok, you mean we can simply use cast<ConstantSDNode> here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102501



More information about the llvm-commits mailing list