[clang] [CIR] Use 32-bit value of alloca number of elements (PR #215638)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 13:15:27 PDT 2026
================
@@ -1965,7 +1965,7 @@ mlir::LogicalResult CIRToLLVMAllocaOpLowering::matchAndRewrite(
? adaptor.getDynAllocSize()
: mlir::LLVM::ConstantOp::create(
rewriter, op.getLoc(),
- typeConverter->convertType(rewriter.getIndexType()), 1);
+ typeConverter->convertType(rewriter.getI32Type()), 1);
----------------
andykaylor wrote:
That limitation seems to be intended to prevent the type from changing during round-trip processing of the IR. It was introduced here: https://github.com/llvm/llvm-project/commit/720762e2c0fc849342996302c37471b35e3537c8
https://github.com/llvm/llvm-project/pull/215638
More information about the cfe-commits
mailing list