[clang] [CIR] Raise IntType max bitwidth to match LLVM IR (PR #191499)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 13 06:39:44 PDT 2026
================
@@ -563,14 +563,9 @@ mlir::Type CIRGenTypes::convertType(QualType type) {
case Type::BitInt: {
const auto *bitIntTy = cast<BitIntType>(type);
- if (bitIntTy->getNumBits() > cir::IntType::maxBitwidth()) {
- cgm.errorNYI(SourceLocation(), "large _BitInt type", type);
- resultType = cgm.sInt32Ty;
- } else {
- resultType = cir::IntType::get(&getMLIRContext(), bitIntTy->getNumBits(),
- bitIntTy->isSigned(),
- /*isBitInt=*/true);
- }
+ resultType = cir::IntType::get(&getMLIRContext(), bitIntTy->getNumBits(),
----------------
erichkeane wrote:
The FE already checks against LLVMIR's max bitwidth, but perhaps an assert?
https://github.com/llvm/llvm-project/pull/191499
More information about the cfe-commits
mailing list