[llvm] [AArch64][SVE] Add dot product lowering for PARTIAL_REDUCE_MLA node (PR #130933)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 17 07:41:46 PDT 2025
================
@@ -1639,6 +1639,26 @@ class TargetLoweringBase {
getCondCodeAction(CC, VT) == Custom;
}
+ /// Return how a PARTIAL_REDUCE_U/SMLA node with Acc type AccVT and Input type
+ /// InputVT should be treated. Either it's legal, needs to be promoted to a
+ /// larger size, needs to be expanded to some other code sequence, or the
+ /// target has a custom expander for it.
+ LegalizeAction getPartialReduceMLAAction(EVT AccVT, EVT InputVT) const {
+ PartialReduceActionTypes TypePair = {AccVT.getSimpleVT().SimpleTy,
+ InputVT.getSimpleVT().SimpleTy};
+ auto It = PartialReduceMLAActions.find(TypePair);
+ if (It != PartialReduceMLAActions.end())
+ return It->second;
+ return Expand;
----------------
sdesmalen-arm wrote:
minor nit: this can be further simplified to:
```suggestion
auto It = PartialReduceMLAActions.find(
{AccVT.getSimpleVT().SimpleTy, InputVT.getSimpleVT().SimpleTy});
return It == PartialReduceMLAActions.end() ? Expand : It->second;
```
https://github.com/llvm/llvm-project/pull/130933
More information about the llvm-commits
mailing list