[llvm] [AArch64][CostModel] Consider i32 --> i64 partial reduce cost as Invalid for FixedLength vectors (PR #165226)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 29 03:04:29 PDT 2025
================
@@ -5757,8 +5757,15 @@ InstructionCost AArch64TTIImpl::getPartialReductionCost(
return Cost;
}
+ if (!ST->useSVEForFixedLengthVectors() &&
+ (AccumLT.second.isFixedLengthVector() && ST->isNeonAvailable() &&
+ ST->hasDotProd()) &&
+ (AccumLT.second.getScalarType() == MVT::i64 &&
+ InputLT.second.getScalarType() == MVT::i32))
+ return Invalid;
----------------
david-arm wrote:
An Invalid cost is currently used by the AArch64 cost model to imply "this cannot be lowered", whereas what you're saying is that it can be lowered, but the cost could be high. I would prefer this to simply use a conservative high cost rather than Invalid. Is there anything preventing you from using a high cost?
https://github.com/llvm/llvm-project/pull/165226
More information about the llvm-commits
mailing list