[llvm] [AArch64] Use firstp for SVE2.2 cttz.elts (PR #221182)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 06:10:47 PDT 2026
================
@@ -9169,8 +9153,12 @@ SDValue AArch64TargetLowering::LowerOperation(SDValue Op,
}
SDValue Pg = getPredicateForVector(DAG, DL, VT);
- SDValue NewCttzElts =
- DAG.getNode(AArch64ISD::CTTZ_ELTS, DL, MVT::i64, Pg, CttzOp);
+ // We preserve the poison semantics here to avoid the poison path from being
+ // affected by the checks emitted for the no-poison case.
+ unsigned Opcode = Op.getOpcode() == ISD::CTTZ_ELTS_ZERO_POISON
+ ? AArch64ISD::CTTZ_ELTS_ZERO_POISON
----------------
Lukacma wrote:
Is there any reason to make these new ISD nodes target specific ? Wouldn't it be better to create general ISD nodes for CTTZ_ELTS* and use those ?
https://github.com/llvm/llvm-project/pull/221182
More information about the llvm-commits
mailing list