[llvm] [DAGCombine] Support (shl %x, constant) in foldPartialReduceMLAMulOp. (PR #160663)

Sam Tebbs via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 26 02:08:51 PDT 2025


================
@@ -12996,13 +12996,31 @@ SDValue DAGCombiner::foldPartialReduceMLAMulOp(SDNode *N) {
   SDValue Op1 = N->getOperand(1);
   SDValue Op2 = N->getOperand(2);
 
-  APInt C;
-  if (Op1->getOpcode() != ISD::MUL ||
-      !ISD::isConstantSplatVector(Op2.getNode(), C) || !C.isOne())
----------------
SamTebbs33 wrote:

Ah yes, I mis-read where the brackets were.

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


More information about the llvm-commits mailing list