[llvm] [AArch64] Extend efficient lowering of experimental.cttz.elts (PR #92114)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Fri May 17 03:42:45 PDT 2024
================
@@ -5838,9 +5840,21 @@ SDValue AArch64TargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
return SDValue();
}
case Intrinsic::experimental_cttz_elts: {
- SDValue NewCttzElts =
- DAG.getNode(AArch64ISD::CTTZ_ELTS, dl, MVT::i64, Op.getOperand(1));
+ SDValue CttzOp = Op.getOperand(1);
+ EVT VT = CttzOp.getValueType();
+
+ if (!VT.isScalableVector()) {
----------------
paulwalker-arm wrote:
It's better to check for the affirmative (in this case `isFixedLengthVector()`) when protecting code.
https://github.com/llvm/llvm-project/pull/92114
More information about the llvm-commits
mailing list