[PATCH] D105673: [SelectionDAG] Fix the representation of ISD::STEP_VECTOR.

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 20 10:46:57 PDT 2021


paulwalker-arm accepted this revision.
paulwalker-arm added a comment.
This revision is now accepted and ready to land.

I'm happy with the patch from an SVE point of view.  I'm less enamoured by the MOVi32imm changes from the prerequisite patch, but I won't loose sleep over it.

I guess it's up to the RISCV folk to decide if they're happy to accept the patch based on the RV32 regression or can suggest an easy fix.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1750-1753
 SDValue SelectionDAG::getStepVector(const SDLoc &DL, EVT ResVT) {
-  EVT OpVT = TLI->getTypeToTransformTo(*getContext(), ResVT.getScalarType());
-  return getStepVector(DL, ResVT, getConstant(1, DL, OpVT));
+  APInt One(ResVT.getScalarSizeInBits(), 1);
+  return getStepVector(DL, ResVT, One);
 }
----------------
Thanks for adding this overload.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105673



More information about the llvm-commits mailing list