================
@@ -2497,7 +2497,8 @@ AArch64FrameLowering::getFrameIndexReference(const 
MachineFunction &MF, int FI,
   return resolveFrameIndexReference(
       MF, FI, FrameReg,
       /*PreferFP=*/
-      MF.getFunction().hasFnAttribute(Attribute::SanitizeHWAddress),
+      MF.getFunction().hasFnAttribute(Attribute::SanitizeHWAddress) ||
+          MF.getFunction().hasFnAttribute(Attribute::SanitizeMemTag),
       /*ForSimm=*/false);
----------------
eugenis wrote:

So this will cause most of the local references to use FP, but our "base tagged 
pointer" is SP-based (see the aarch64_irg_sp intrinsic). Would not that 
pessimize the codegen a lot? Please check that nothing stupid is happening in 
the backend.

There is a bunch of relevant tests under test/CodeGen/AArch64/stack-tagging-*

https://github.com/llvm/llvm-project/pull/86356
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to