[llvm] [AArch64] Sink NOT to be fold into BIC/ORN/EON (PR #176194)
Ricardo Jesus via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 18 09:50:15 PDT 2026
================
@@ -6845,6 +6845,50 @@ bool AArch64TTIImpl::isProfitableToSinkOperands(
}
break;
+ // Type | BIC | ORN | EON
+ // ----------------+-----------+-----------+-----------
+ // scalar | Base | Base | Base
+ // scalar w/shift | - | - | -
+ // fixed vector | NEON/Base | NEON/Base | BSL2N/Base
+ // scalable vector | SVE | - | BSL2N
+ case Instruction::Xor:
+ // EON only for scalars (possibly expanded fixed vectors)
+ // and vectors using the SVE2/SME BSL2N instruction.
+ if (I->getType()->isVectorTy() && ST->hasNEON() && !ST->hasSVE2() &&
----------------
rj-jesus wrote:
I see, thanks. In that case, do you not want `ST->isNeonAvailable()` to also capture cases where the target does have Neon but it isn't available?
https://github.com/llvm/llvm-project/pull/176194
More information about the llvm-commits
mailing list