[llvm] [AArch64][SME] Use LibcallLoweringInfo in the MachineSMEABIPass (PR #177762)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 24 11:50:56 PST 2026
================
@@ -876,11 +886,24 @@ void MachineSMEABI::restorePhyRegSave(const PhysRegSave &RegSave,
.addReg(RegSave.X0Save);
}
+void MachineSMEABI::addSMELibCall(MachineInstrBuilder &MIB, RTLIB::Libcall LC,
+ CallingConv::ID ExpectedCC) {
+ RTLIB::LibcallImpl LCImpl = LLI->getLibcallImpl(LC);
+ if (LCImpl == RTLIB::Unsupported)
+ emitError("Can't lower SME ABI (SME routines unsupported)");
+ CallingConv::ID CC = LLI->getLibcallImplCallingConv(LCImpl);
+ StringRef SymbolName = RTLIB::RuntimeLibcallsInfo::getLibcallImplName(LCImpl);
+ if (CC != ExpectedCC)
+ emitError("Invalid calling convention for SME rountine: " + SymbolName);
----------------
arsenm wrote:
```suggestion
emitError("invalid calling convention for SME routine: '" + SymbolName + "'");
```
https://github.com/llvm/llvm-project/pull/177762
More information about the llvm-commits
mailing list