[PATCH] D97299: [IR][SVE] Add new llvm.experimental.stepvector intrinsic
Paul Walker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 19 08:57:54 PDT 2021
paulwalker-arm accepted this revision.
paulwalker-arm added a comment.
This revision is now accepted and ready to land.
A couple of niggles but otherwise looks good to me.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:4793
+ NOutVT.getVectorElementType());
+ APInt StepVal = cast<ConstantSDNode>(N->getOperand(0))->getAPIntValue();
+ SDValue Step = DAG.getConstant(StepVal.getZExtValue(), dl, NOutElemVT);
----------------
Could use `N->getConstantOperandAPInt(0)` here.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4667
+ "STEP_VECTOR can only be used with scalable types");
+ assert(VT.getScalarSizeInBits() >= 8 &&
+ "STEP_VECTOR can only be used with vectors of integers that are at "
----------------
To match the comment you'll need to add an `isInteger` test.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:9052-9053
+ EVT ElemVT = VT.getScalarType();
+ assert(ElemVT != MVT::i1 &&
+ "Vectors of i1 types not supported for STEP_VECTOR");
+
----------------
This assert should not be necessary as you're protecting this already within getNode and thus can assume the node to be valid.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97299/new/
https://reviews.llvm.org/D97299
More information about the llvm-commits
mailing list