[llvm] [AArch64] Add custom lowering of nxv32i1 get.active.lane.mask nodes (PR #141969)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 2 06:11:13 PDT 2025
================
@@ -27328,6 +27330,29 @@ void AArch64TargetLowering::ReplaceExtractSubVectorResults(
Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, VT, Half));
}
+void AArch64TargetLowering::ReplaceGetActiveLaneMaskResults(
+ SDNode *N, SmallVectorImpl<SDValue> &Results, SelectionDAG &DAG) const {
+ if (!Subtarget->hasSVE2p1())
+ return;
+
+ SDLoc DL(N);
+ SDValue Idx = N->getOperand(0);
+ SDValue TC = N->getOperand(1);
+ if (Idx.getValueType() != MVT::i64) {
+ Idx = DAG.getZExtOrTrunc(Idx, DL, MVT::i64);
----------------
david-arm wrote:
Is it worth having a test with a i128 index type to test the trunc case?
https://github.com/llvm/llvm-project/pull/141969
More information about the llvm-commits
mailing list