[llvm] [NFC][AArch64][SVE] Rename variables in partial reduction lowering functions (PR #120589)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 20 00:52:29 PST 2024


================
@@ -21739,73 +21739,71 @@ SDValue tryLowerPartialReductionToDot(SDNode *N,
   SDLoc DL(N);
 
   // The narrower of the two operands. Used as the accumulator
-  auto NarrowOp = N->getOperand(1);
-  auto MulOp = N->getOperand(2);
-  if (MulOp->getOpcode() != ISD::MUL)
+  auto A = N->getOperand(1);
+  auto B = N->getOperand(2);
+  if (B->getOpcode() != ISD::MUL)
     return SDValue();
 
-  auto ExtA = MulOp->getOperand(0);
-  auto ExtB = MulOp->getOperand(1);
+  auto ExtMulOp1 = B->getOperand(0);
+  auto ExtMulOp2 = B->getOperand(1);
 
-  if (!ISD::isExtOpcode(ExtA->getOpcode()) ||
-      !ISD::isExtOpcode(ExtB->getOpcode()))
+  if (!ISD::isExtOpcode(ExtMulOp1->getOpcode()) ||
+      !ISD::isExtOpcode(ExtMulOp2->getOpcode()))
----------------
sdesmalen-arm wrote:

It probably helps to combine some of the conditions together, e.g.:
```suggestion
  SDValue Op2 = N->getOperand(2);
  if (Op2->getOpcode() != ISD::MUL || 
      !ISD::isExtOpcode(Op2->getOperand(0)->getOpcode()) ||
      !ISD::isExtOpcode(Op2->getOperand(1)->getOpcode()))
    return SDValue();
```

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


More information about the llvm-commits mailing list