[llvm] [AArch64] Add CodeGen support for FEAT_CPA (PR #105669)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 22 09:31:11 PDT 2024
================
@@ -9071,8 +9083,13 @@ bool SelectionDAGBuilder::visitMemPCpyCall(const CallInst &I) {
Size = DAG.getSExtOrTrunc(Size, sdl, Dst.getValueType());
// Adjust return pointer to point just past the last dst byte.
- SDValue DstPlusSize = DAG.getNode(ISD::ADD, sdl, Dst.getValueType(),
- Dst, Size);
+ unsigned int AddOpcode = ISD::PTRADD;
+ if (!DAG.getTarget().shouldPreservePtrArith(
+ DAG.getMachineFunction().getFunction())) {
+ AddOpcode = ISD::ADD;
+ }
+ SDValue DstPlusSize =
+ DAG.getNode(AddOpcode, sdl, Dst.getValueType(), Dst, Size);
----------------
arichardson wrote:
getMemBasePlusOffset?
https://github.com/llvm/llvm-project/pull/105669
More information about the llvm-commits
mailing list