[llvm] [PowerPC] using milicode call for strcpy instead of lib call (PR #174782)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 7 08:25:08 PST 2026
================
@@ -9166,6 +9166,32 @@ SelectionDAG::getMemcmp(SDValue Chain, const SDLoc &dl, SDValue Mem0,
return TLI->LowerCallTo(CLI);
}
+std::pair<SDValue, SDValue> SelectionDAG::getStrcpy(SDValue Chain,
+ const SDLoc &dl,
+ SDValue Dst, SDValue Src,
+ const CallInst *CI) {
+ const char *LibCallName = TLI->getLibcallName(RTLIB::STRCPY);
+ if (!LibCallName)
+ return {};
+
+ PointerType *PT = PointerType::getUnqual(*getContext());
+ TargetLowering::ArgListTy Args = {{Dst, PT}, {Src, PT}};
+
+ TargetLowering::CallLoweringInfo CLI(*this);
+ bool IsTailCall =
+ isInTailCallPositionWrapper(CI, this, /*AllowReturnsFirstArg*/ true);
----------------
arsenm wrote:
```suggestion
isInTailCallPositionWrapper(CI, this, /*AllowReturnsFirstArg=*/ true);
```
https://github.com/llvm/llvm-project/pull/174782
More information about the llvm-commits
mailing list