Skip to content

Commit 4fca639

Browse files
igormunkinlll-phill-lll
authored andcommitted
YQL-19967: Fix codegen for args slot addressing
Follows up e13229863b189b9ad804f0c6772204399430179e commit_hash:6a78a1a14d0ce96fdbbac9b97f0a2f1c8764b59b (cherry picked from commit c81a897) (cherry picked from commit 4298113)
1 parent 3ecd4d1 commit 4fca639

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
@@ -186,10 +186,11 @@ using TBaseComputation = TMutableCodegeneratorPtrNode<TUdfWrapper<TValidatePolic
186186

187187
const auto argsType = ArrayType::get(valueType, RunConfigArgs);
188188
const auto args = new AllocaInst(argsType, 0U, "args", block);
189+
const auto zero = ConstantInt::get(indexType, 0);
189190
Value* runConfigValue;
190191
for (ui32 i = 0; i < RunConfigArgs; i++) {
191192
const auto argIndex = ConstantInt::get(indexType, i);
192-
const auto argSlot = GetElementPtrInst::CreateInBounds(valueType, args, {argIndex}, "arg", block);
193+
const auto argSlot = GetElementPtrInst::CreateInBounds(argsType, args, {zero, argIndex}, "arg", block);
193194
if (i == 0) {
194195
GetNodeValue(argSlot, RunConfigNode, ctx, block);
195196
runConfigValue = new LoadInst(valueType, argSlot, "runconfig", block);

0 commit comments

Comments
 (0)