[llvm] [AArch64] Use firstp for SVE2.2 cttz.elts (PR #221182)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 08:48:25 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:
You create a new AARCH64ISD node in this patch. With this to me it looks like semantics of AARCH64ISD::CTTZ_ELTS match ISD::CTTZ_ELTS and same for the poison variant, so we might as well remove our target specific AARCH64ISD nodes and use ISD ones.
https://github.com/llvm/llvm-project/pull/221182
More information about the llvm-commits
mailing list