================ @@ -680,14 +680,11 @@ ABIArgInfo RISCVABIInfo::classifyArgumentType(QualType Ty, bool IsFixed, if (const auto *ED = Ty->getAsEnumDecl()) Ty = ED->getIntegerType(); - // All integral types are promoted to XLen width - if (Size < XLen && Ty->isIntegralOrEnumerationType()) { - return extendType(Ty, CGT.ConvertType(Ty)); - } - if (const auto *EIT = Ty->getAs<BitIntType>()) { - if (EIT->getNumBits() < XLen) - return extendType(Ty, CGT.ConvertType(Ty)); + // FIXME: Maybe we should treat 32 as a special case and wait for + // the SPEC to decide. + if (EIT->getNumBits() <= 2 * XLen) + return ABIArgInfo::getExtend(Ty, CGT.ConvertType(Ty)); if (EIT->getNumBits() > 128 || ---------------- topperc wrote:
Isn't the `EIT->getNumBits() > 64` check always true after your change? And it looks like for RV32, any size between 65 bits and 128 bits will pass directly when `-fforce-enable-int128` is passed. Why is _BitInt behavior affected by -fforce-enable-int128? https://github.com/llvm/llvm-project/pull/156592 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits