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

YunQiang Su via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 05:47:50 PDT 2024


================
@@ -1213,6 +1214,27 @@ 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) {
+  SDValue N0 = N->getOperand(0);
+  EVT VT = N->getValueType(0);
+
+  // Pattern match XOR.
+  //  $dst = sign_extend (xor (trunc $src), imm)
----------------
wzssyqa wrote:

`trunc` needs an argument.  I guess the argument will have some effects on the result.

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


More information about the llvm-commits mailing list