[llvm] [MIPS]Remove unnecessary SLL instructions on MIPS64el (PR #109386)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 26 21:02:01 PST 2025


================
@@ -1210,6 +1211,41 @@ static SDValue performSHLCombine(SDNode *N, SelectionDAG &DAG,
                      DAG.getConstant(SMSize, DL, MVT::i32));
 }
 
+static SDValue performSignExtendCombine(SDNode *N, SelectionDAG &DAG, TargetLowering::DAGCombinerInfo &DCI,const MipsSubtarget &Subtarget) {
+  if (DCI.Level != AfterLegalizeDAG) {
+    return SDValue();
+  }
+
+  if (!Subtarget.isGP64bit()) {
+    return SDValue();
+  }
+
+  SDValue N0 = N->getOperand(0);
+  EVT VT = N->getValueType(0);
+
+  if (N0->getNumOperands() != 2) {
----------------
anbbna wrote:

Yes, I will remove it.

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


More information about the llvm-commits mailing list