[llvm] [AArch64] Don't allow mixed partial reductions without i8mm (PR #137602)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 30 05:22:15 PDT 2025


================
@@ -5344,11 +5344,10 @@ InstructionCost AArch64TTIImpl::getPartialReductionCost(
   } else
     return Invalid;
 
-  // AArch64 supports lowering mixed extensions to a usdot but only if the
-  // i8mm or sve/streaming features are available.
+  // AArch64 supports lowering mixed fixed-width extensions to a usdot but only
+  // if the i8mm feature is available.
   if (OpAExtend == TTI::PR_None || OpBExtend == TTI::PR_None ||
-      (OpAExtend != OpBExtend && !ST->hasMatMulInt8() &&
-       !ST->isSVEorStreamingSVEAvailable()))
+      (OpAExtend != OpBExtend && VF.isFixed() && !ST->hasMatMulInt8()))
----------------
sdesmalen-arm wrote:

I think `VF.isFixed()` can be removed, because SVE also has usdot instructions (if i8mm is available)

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


More information about the llvm-commits mailing list