[llvm] [PowerPC] Implement a more efficient memcmp in cases where the length is known. (PR #158657)

Lei Huang via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 17 09:45:35 PDT 2025


================
@@ -15556,6 +15556,63 @@ SDValue PPCTargetLowering::combineSetCC(SDNode *N,
       SDValue Add = DAG.getNode(ISD::ADD, DL, OpVT, LHS, RHS.getOperand(1));
       return DAG.getSetCC(DL, VT, Add, DAG.getConstant(0, DL, OpVT), CC);
     }
+    if (Subtarget.hasVSX()) {
+      if (LHS.getOpcode() == ISD::LOAD && RHS.getOpcode() == ISD::LOAD &&
+          LHS.hasOneUse() && RHS.hasOneUse() &&
+          LHS.getValueType() == MVT::i128 && RHS.getValueType() == MVT::i128) {
----------------
lei137 wrote:

why the type restriction?  

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


More information about the llvm-commits mailing list