================ @@ -1774,6 +1774,18 @@ llvm::Constant *ConstantEmitter::emitForMemory(CodeGenModule &CGM, return Res; } + if (const auto *BIT = destType->getAs<BitIntType>()) { + if (BIT->getNumBits() > 128) { + // Long _BitInt has array of bytes as in-memory type. + ConstantAggregateBuilder Builder(CGM); + llvm::Type *DesiredTy = CGM.getTypes().ConvertTypeForMem(destType); + auto *CI = cast<llvm::ConstantInt>(C); ---------------- momchil-velikov wrote:
How about a "small" `_BitInt` ? The comment starts > // LLVM type doesn't match AST type only for big enough _BitInts, and for AArch32 and AArch64 we are going to have a non-matching LLVM types even for "small" `_BitInt`s - for AArch32 because the ABI wants the padding bing in-memory representation to contain zero or the sign-bit, and for both we'd like to emit loads/stores in bigger chunks, e.g. `i17` is a single `i32` load store, as opposed to two separate accesses to `i16` and `i8`. https://github.com/llvm/llvm-project/pull/91364 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits