[llvm] [LV][AArch64] Provide option to use partial reductions by default (PR #216001)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 08:25:01 PDT 2026
================
@@ -6684,10 +6684,30 @@ InstructionCost AArch64TTIImpl::getPartialReductionCost(
return Invalid;
if ((Opcode != Instruction::Add && Opcode != Instruction::Sub &&
- Opcode != Instruction::FAdd && Opcode != Instruction::FSub) ||
- OpAExtend == TTI::PR_None)
+ Opcode != Instruction::FAdd && Opcode != Instruction::FSub))
return Invalid;
+ // We don't support 128b or higher element types.
+ if (InputTypeA->getScalarSizeInBits() > 64 ||
+ (InputTypeB && InputTypeB->getScalarSizeInBits() > 64) ||
+ AccumType->getScalarSizeInBits() > 64)
----------------
sdesmalen-arm wrote:
What about explicitly testing that InputTypeA and AccumType are one of `{8, 16, 32, 64}` (and discard any other cases).
(I think you can ignore InputTypeB, as that should match InputTypeA, if non-nullptr)
https://github.com/llvm/llvm-project/pull/216001
More information about the llvm-commits
mailing list