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.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/CodeGen/TargetInfo.cpp | ||
---|---|---|
10241–10243 | Do you have tests that show the impact of the added FLen >= Size && ArgFPRsLeft conditions for other values besides complex floats? |
Comment Actions
Good catch, thanks for the fix! The logic was incorrectly written assuming isFloatingType would return false for complex values which is of course incorrect.
clang/lib/CodeGen/TargetInfo.cpp | ||
---|---|---|
10241–10243 | That's actually not an added clause - it's just been clang-formatted onto a new line. |
Do you have tests that show the impact of the added FLen >= Size && ArgFPRsLeft conditions for other values besides complex floats?