This patch fixed the error of counting the remaining FPRs. Complex floating-point values should be passed by two FPRs for the hard-float ABI. If no two FPRs are available, it should be passed via a 64-bit GPR (fp+fp). ArgFPRsLeft is only decreased one while the type is complex floating-point. It causes two floating-point values in the complex are passed separately by two GPRs.
Good catch, thanks for the fix! The logic was incorrectly written assuming isFloatingType would return false for complex values which is of course incorrect.
That's actually not an added clause - it's just been clang-formatted onto a new line.