[llvm] [AArch64] Add new dot insts. to cost model (PR #189642)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 04:00:54 PDT 2026


================
@@ -6029,15 +6029,20 @@ InstructionCost AArch64TTIImpl::getPartialReductionCost(
       // the extends in the IR are still counted. This can be fixed
       // after https://github.com/llvm/llvm-project/pull/147302 has landed.
       return Cost;
-    // f16 -> f32 is natively supported for fdot
-    if (Opcode == Instruction::FAdd && (ST->hasSME2() || ST->hasSVE2p1()) &&
-        AccumLT.second.getScalarType() == MVT::f32 &&
-        InputLT.second.getScalarType() == MVT::f16 &&
-        AccumLT.second.getVectorMinNumElements() == 4 &&
-        InputLT.second.getVectorMinNumElements() == 8)
+    // i8 -> i16 is natively supported with SVE2p3
----------------
Lukacma wrote:

Depends on the  final Cost for specific usecase. From what I see in the cost model if vector.partial.reduce.fadd would be emitted (which I don't think is guaranteed), we would either gets lowered using *mlal instructions or expanded.

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


More information about the llvm-commits mailing list