[llvm] [RISCV] DAG combine (mul (add x, 1), y) -> vmadd (PR #71495)

Wang Pengcheng via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 21:37:53 PST 2023


================
@@ -12423,6 +12423,45 @@ static SDValue performXORCombine(SDNode *N, SelectionDAG &DAG,
   return combineSelectAndUseCommutative(N, DAG, /*AllOnes*/ false, Subtarget);
 }
 
+static SDValue performMULCombine(SDNode *N, SelectionDAG &DAG,
+                                 const RISCVSubtarget &Subtarget) {
+  SDLoc DL(N);
+  EVT VT = N->getValueType(0);
----------------
wangpc-pp wrote:

MACs for scalar integer exist in `XTheadMac` but I don't know it matters here.

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


More information about the llvm-commits mailing list