[llvm] [MIPS]Remove unnecessary SLL instructions on MIPS64el (PR #109386)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 26 11:01:44 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) {
----------------
topperc wrote:
This check is unnecessary. The `N0.getOpcode() == ISD::XOR` check below covers it.
https://github.com/llvm/llvm-project/pull/109386
More information about the llvm-commits
mailing list