[llvm] [ARM] Use FPRegs for fastcc calling convention detection. (PR #184593)
Simon Tatham via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 05:35:30 PST 2026
================
@@ -1714,10 +1714,10 @@ ARMTargetLowering::getEffectiveCallingConv(CallingConv::ID CC,
case CallingConv::Fast:
case CallingConv::CXX_FAST_TLS:
if (!getTM().isAAPCS_ABI()) {
- if (Subtarget->hasVFP2Base() && !Subtarget->isThumb1Only() && !isVarArg)
+ if (Subtarget->hasFPRegs() && !Subtarget->isThumb1Only() && !isVarArg)
----------------
statham-arm wrote:
This fixes an inconsistency that I accidentally introduced in commit 60ea6f35a270d11c91770a2fc366888e7d3859f4, where I made this same change for `CallingConv::C` both here (10 lines further up) and in a similar switch statement in `ARMFastISel.cpp`. But the two switches had different sets of other calling conventions sharing the case handler for `CallingConv::C`, so I accidentally made `CXX_FAST_TLS` behave differently between the two. In this commit you're making `CXX_FAST_TLS` consistent again.
But now `CallingConv::Fast` has the same inconsistency, because here you've changed it over to checking `hasFPRegs`, and in `ARMFastISel.cpp` it's still checking `hasVFP2Base`. Can we fix that at the same time, so that _all_ the calling conventions check `hasFPRegs` rather than `hasVFP2Base`?
https://github.com/llvm/llvm-project/pull/184593
More information about the llvm-commits
mailing list