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

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 28 02:20:33 PDT 2025


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

According to the specification, the instruction is undefined if `!i8mm || (!sve && !sme)`, which means the instruction is defined if `i8mm && (sve || sme)`. So this needs an additional `&& ST->isSVEorStreamingSVEAvailable()`

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


More information about the llvm-commits mailing list