[llvm] [AArch64] Add CodeGen support for FEAT_CPA (PR #79569)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 02:27:55 PST 2024


================
@@ -2075,6 +2075,10 @@ bool AArch64InstructionSelector::preISelLower(MachineInstr &I) {
     return Changed;
   }
   case TargetOpcode::G_PTR_ADD:
+    // If Checked Pointer Arithmetic (FEAT_CPA) is present, preserve the pointer
+    // arithmetic semantics instead of falling back to regular arithmetic.
+    if (TM.isPtrArithmeticChecked(MF.getFunction()))
+      return false;
----------------
arsenm wrote:

How is this supposed to work for SDAG?

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


More information about the llvm-commits mailing list