[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:12 PDT 2024
================
@@ -11169,9 +11186,14 @@ TargetLowering::LowerCallTo(TargetLowering::CallLoweringInfo &CLI) const {
MachineFunction &MF = CLI.DAG.getMachineFunction();
Align HiddenSRetAlign = MF.getFrameInfo().getObjectAlign(DemoteStackIdx);
for (unsigned i = 0; i < NumValues; ++i) {
- SDValue Add = CLI.DAG.getNode(ISD::ADD, CLI.DL, PtrVT, DemoteStackSlot,
- CLI.DAG.getConstant(Offsets[i], CLI.DL,
- PtrVT), Flags);
+ unsigned int AddOpcode = ISD::PTRADD;
+ if (!CLI.DAG.getTarget().shouldPreservePtrArith(
+ CLI.DAG.getMachineFunction().getFunction())) {
+ AddOpcode = ISD::ADD;
+ }
+ SDValue Add = CLI.DAG.getNode(
----------------
arichardson wrote:
getMemBasePlusOffset?
https://github.com/llvm/llvm-project/pull/105669
More information about the llvm-commits
mailing list