[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 02:35:24 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:

As explained in the writeup, this gets lowered to SMLAL[BT] when SVE2 is available as described by state T3 

https://github.com/llvm/llvm-project/pull/165226


More information about the llvm-commits mailing list