Skip to content

Commit c81a897

Browse files
committed
YQL-19967: Fix codegen for args slot addressing
Follows up e13229863b189b9ad804f0c6772204399430179e commit_hash:6a78a1a14d0ce96fdbbac9b97f0a2f1c8764b59b
1 parent c97b5f1 commit c81a897

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

yql/essentials/minikql/comp_nodes/mkql_udf.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,11 @@ using TBaseComputation = TMutableCodegeneratorPtrNode<TUdfWrapper<TValidatePolic
193193

194194
const auto argsType = ArrayType::get(valueType, RunConfigArgs);
195195
const auto args = new AllocaInst(argsType, 0U, "args", block);
196+
const auto zero = ConstantInt::get(indexType, 0);
196197
Value* runConfigValue;
197198
for (ui32 i = 0; i < RunConfigArgs; i++) {
198199
const auto argIndex = ConstantInt::get(indexType, i);
199-
const auto argSlot = GetElementPtrInst::CreateInBounds(valueType, args, {argIndex}, "arg", block);
200+
const auto argSlot = GetElementPtrInst::CreateInBounds(argsType, args, {zero, argIndex}, "arg", block);
200201
if (i == 0) {
201202
GetNodeValue(argSlot, RunConfigNode, ctx, block);
202203
runConfigValue = new LoadInst(valueType, argSlot, "runconfig", block);

0 commit comments

Comments
 (0)