[llvm] [SelectionDAG] Expand CTTZ_ELTS[_ZERO_POISON] and handle legalization (PR #188691)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 30 03:44:45 PDT 2026
================
@@ -10115,22 +10115,24 @@ SDValue TargetLowering::expandVPCTTZElements(SDNode *N,
return DAG.getNode(ISD::VP_REDUCE_UMIN, DL, ResVT, ExtEVL, Select, Mask, EVL);
}
-SDValue TargetLowering::expandVectorFindLastActive(SDNode *N,
- SelectionDAG &DAG) const {
- SDLoc DL(N);
- SDValue Mask = N->getOperand(0);
+/// Returns a step vector that's guaranteed to fit the number of elements in \p
+/// Mask, as well as a type-legalized version of \p Mask.
+static std::pair<SDValue, SDValue> getLegalStepVector(SDValue Mask,
----------------
david-arm wrote:
nit: you're also legalising the mask so perhaps the function should be called `getLegalMaskAndStepVector`?
https://github.com/llvm/llvm-project/pull/188691
More information about the llvm-commits
mailing list