[llvm] [AArch64][CostModel] Add constraints on which partial reductions are (PR #163728)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 16 03:14:34 PDT 2025
================
@@ -5661,6 +5661,9 @@ InstructionCost AArch64TTIImpl::getPartialReductionCost(
AccumType->getScalarSizeInBits() / InputTypeA->getScalarSizeInBits();
if (VF.getKnownMinValue() <= Ratio)
return Invalid;
+ // i32 -> i64 or i16 -> i32 is not natively supported on Neon and SVE.
----------------
david-arm wrote:
Also, we can in theory lower code for a ratio of 2 even for NEON or SVE. It just might not be optimal codegen. Perhaps the cost modelling below needs modifying to handle the case you are worried about?
https://github.com/llvm/llvm-project/pull/163728
More information about the llvm-commits
mailing list