[llvm] [DAG] Introduce generic shl_add node [NFC] (PR #88791)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 10:26:14 PDT 2024


================
@@ -46905,12 +46897,18 @@ static SDValue reduceVMULWidth(SDNode *N, SelectionDAG &DAG,
   return DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, ResLo, ResHi);
 }
 
+static SDValue createMulImm(uint64_t MulAmt, SDValue N, SelectionDAG &DAG,
+                            EVT VT, const SDLoc &DL) {
+  assert(MulAmt == 3 || MulAmt == 5 || MulAmt == 9);
+  SDValue ShAmt = DAG.getConstant(Log2_64(MulAmt - 1), DL, MVT::i8);
+  return DAG.getNode(ISD::SHL_ADD, DL, VT, N, ShAmt, N);
----------------
topperc wrote:

Is this going to cause issue with poison? We've now increased the use count of N.

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


More information about the llvm-commits mailing list