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

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 6 11:23:20 PDT 2025


================
@@ -15556,6 +15556,89 @@ 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);
     }
+
+    // Optimization: Fold i128 equality/inequality compares of two loads into a
+    // vectorized compare using vcmpequb.p when VSX is available.
----------------
RolandF77 wrote:

Maybe say something about this gets inline memcmp.

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


More information about the llvm-commits mailing list