[llvm] [PowerPC][AIX] Using milicode for memcmp instead of libcall (PR #147093)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 10 03:28:33 PDT 2025


================
@@ -8820,6 +8820,45 @@ static void checkAddrSpaceIsValidForLibcall(const TargetLowering *TLI,
                        Twine(AS));
   }
 }
+std::pair<SDValue, SDValue>
+SelectionDAG::getMemcmp(SDValue Chain, const SDLoc &dl, SDValue Mem0,
+                        SDValue Mem1, SDValue Size, const CallInst *CI) {
+
+  const char *LibCallName = TLI->getLibcallName(RTLIB::MEMCMP);
+  if (LibCallName == nullptr)
+    return std::make_pair(SDValue(), SDValue());
----------------
arsenm wrote:

```suggestion
  if (!LibCallName )
    return {};
```

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


More information about the llvm-commits mailing list