[llvm] [mlir] [mlir] fix overflow in LLVM dialect inlining (PR #72878)
Tobias Gysi via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 07:27:10 PST 2023
================
@@ -597,16 +597,16 @@ static Value handleByValArgument(OpBuilder &builder, Operation *callable,
memoryEffects.getArgMem() != LLVM::ModRefInfo::Mod;
// Check if there's an alignment mismatch requiring us to copy.
DataLayout dataLayout = DataLayout::closest(callable);
- unsigned minimumAlignment = dataLayout.getTypeABIAlignment(elementType);
+ uint64_t minimumAlignment = dataLayout.getTypeABIAlignment(elementType);
if (isReadOnly) {
if (requestedAlignment <= minimumAlignment)
return argument;
- unsigned currentAlignment =
+ uint64_t currentAlignment =
tryToEnforceAlignment(argument, requestedAlignment, dataLayout);
----------------
gysit wrote:
`tryToEnforceAlignment` and `tryToEnforceAllocaAlignment` should probably also use uint64_t?
https://github.com/llvm/llvm-project/pull/72878
More information about the llvm-commits
mailing list