[clang] [Sparc][clang] make `_Complex` ABI GCC-compatible (PR #212340)
Sergei Barannikov via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 31 18:50:39 PDT 2026
================
@@ -277,6 +310,15 @@ ABIArgInfo SparcV9ABIInfo::classifyType(QualType Ty, unsigned SizeLimit,
return ABIArgInfo::getExtend(Ty);
}
+ // When being GCC-compatible, cast a complex integer to an integer type
+ // of the right size to get the correct scalar-like behavior.
+ if (isComplexGnuABI(*this))
+ if (const auto *CT = Ty->getAs<ComplexType>();
+ CT && Size < 64 && CT->getElementType()->isIntegerType()) {
----------------
s-barannikov wrote:
nit: Here and in the other place: checking the size of the *element* would be cleaner
https://github.com/llvm/llvm-project/pull/212340
More information about the cfe-commits
mailing list