[flang-commits] [flang] [flang] In AllocMemOp lowering, convert types for calling malloc on 32-bit (PR #129308)
Valentin Clement バレンタイン クレメン via flang-commits
flang-commits at lists.llvm.org
Fri Feb 28 14:40:26 PST 2025
================
@@ -992,7 +992,7 @@ getMallocInModule(ModuleOp mod, fir::AllocMemOp op,
return mlir::SymbolRefAttr::get(userMalloc);
mlir::OpBuilder moduleBuilder(mod.getBodyRegion());
- auto indexType = mlir::IntegerType::get(op.getContext(), 64);
+ auto indexType = mlir::IntegerType::get(op.getContext(), addr32 ? 32 : 64);
----------------
clementval wrote:
LLVMTypeConverter has a `getIndexTypeBitwidth()` function. Probably better that if everywhere.
https://github.com/llvm/llvm-project/pull/129308
More information about the flang-commits
mailing list