[llvm] [AArch64][SME] Fix frame lowering not using a base pointer for SME functions. (PR #91643)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 11:23:25 PDT 2024


================
@@ -552,7 +552,9 @@ bool AArch64RegisterInfo::hasBasePointer(const MachineFunction &MF) const {
     if (hasStackRealignment(MF))
       return true;
 
-    if (MF.getSubtarget<AArch64Subtarget>().hasSVE()) {
+    auto &ST = MF.getSubtarget<AArch64Subtarget>();
+    if (ST.hasSVE() ||
+        (ST.hasSME() && ST.hasStreamingInterfaceOrBody(MF.getFunction()))) {
----------------
efriedma-quic wrote:

The subtarget is per-function, sort of... see AArch64TargetMachine::getSubtargetImpl.

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


More information about the llvm-commits mailing list