[llvm] [SelectionDAG] Add PARTIAL_REDUCE_U/SMLA ISD Nodes (PR #125207)
James Chesterman via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 7 09:10:27 PST 2025
================
@@ -11890,6 +11891,61 @@ SDValue TargetLowering::expandVECTOR_COMPRESS(SDNode *Node,
return DAG.getLoad(VecVT, DL, Chain, StackPtr, PtrInfo);
}
+SDValue TargetLowering::expandPartialReduceMLA(SDNode *N,
+ SelectionDAG &DAG) const {
+ SDLoc DL(N);
+ SDValue Acc = N->getOperand(0);
+ SDValue MulLHS = N->getOperand(1);
+ SDValue MulRHS = N->getOperand(2);
+ EVT ReducedTy = Acc.getValueType();
+ EVT FullTy = MulLHS.getValueType();
+
+ auto ExtendToAccEltVT = [&](SDValue V) {
+ unsigned ExtOpc = V->getOpcode() == ISD::SIGN_EXTEND ? ISD::SIGN_EXTEND
+ : ISD::ZERO_EXTEND;
----------------
JamesChesterman wrote:
Done. Changed it so both operands are promoted with the same signedness, and it only depends on `N`'s opcode.
https://github.com/llvm/llvm-project/pull/125207
More information about the llvm-commits
mailing list