Skip to content

Commit ffe9473

Browse files
committed
[ExecutionEngine] Fix GEP type
Fix bug introduced in 2c68ecc, the GEP type was off-by-ptr. Apparently I didn't run the MLIR tests.
1 parent 5acddf5 commit ffe9473

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/ExecutionEngine/ExecutionEngine.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static void packFunctionArguments(Module *module) {
180180
llvm::Value *argIndex = llvm::Constant::getIntegerValue(
181181
builder.getInt64Ty(), APInt(64, indexedArg.index()));
182182
llvm::Value *argPtrPtr = builder.CreateGEP(
183-
builder.getInt8Ty(), argList, argIndex);
183+
builder.getInt8PtrTy(), argList, argIndex);
184184
llvm::Value *argPtr = builder.CreateLoad(builder.getInt8PtrTy(),
185185
argPtrPtr);
186186
llvm::Type *argTy = indexedArg.value().getType();
@@ -197,7 +197,7 @@ static void packFunctionArguments(Module *module) {
197197
llvm::Value *retIndex = llvm::Constant::getIntegerValue(
198198
builder.getInt64Ty(), APInt(64, llvm::size(func.args())));
199199
llvm::Value *retPtrPtr =
200-
builder.CreateGEP(builder.getInt8Ty(), argList, retIndex);
200+
builder.CreateGEP(builder.getInt8PtrTy(), argList, retIndex);
201201
llvm::Value *retPtr = builder.CreateLoad(builder.getInt8PtrTy(),
202202
retPtrPtr);
203203
retPtr = builder.CreateBitCast(retPtr, result->getType()->getPointerTo());

0 commit comments

Comments
 (0)