[PATCH] D97299: [IR][SVE] Add new llvm.experimental.stepvector intrinsic

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 11 00:44:53 PST 2021


david-arm added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/SelectionDAG.h:657-658
 
+  SDValue getStepVector(const SDLoc &DL, EVT ResVT, EVT OpVT,
+                        const APInt Step) {
+    assert(Step.getActiveBits() <= OpVT.getScalarSizeInBits());
----------------
paulwalker-arm wrote:
> I guess I've caused this with my previous "don't use a node request" and thus the answer will be no, but I'll ask the question anyway. Can OpVT be dropped here? as it seems inconvenient.
Yeah, that's right. This arose because of trying to pass in an immediate value here. I'm not sure of a much less ugly way when removing OpVT. If we remove it then I have to create a type every time based upon the current width of Step and assume the caller has set the bit width correctly. I can't just use the element type of ResVT because this takes me back to square one, i.e. that I then need to worry about promoting the type to i32 or i64. I could pass in a ConstantSDNode instead of the {OpVT, Step} pair, which has both the OpVT type and the APInt combined?


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

https://reviews.llvm.org/D97299



More information about the llvm-commits mailing list