[llvm] [AArch64][CostModel] Consider i32 --> i64 partial reduce cost as Invalid for FixedLength vectors (PR #165226)
Sushant Gokhale via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 29 03:10:21 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;
----------------
sushgokh wrote:
Lets suppose that we return arbitrary high cost as **PR #158641 was already doing**. I dont know how the Initial vplan is constructed, but looking at the debug logs, it seems that once the partial reduce cost is valid(even though its high), it doesnt consider the possibility of vplan without the instrinsics and hence, we get code with VF=2 as in state T2
https://github.com/llvm/llvm-project/pull/165226
More information about the llvm-commits
mailing list