Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/coreclr/jit/helperexpansion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ bool Compiler::fgExpandRuntimeLookupsForCall(BasicBlock** pBlock, Statement* stm
return false;
}

assert(call->gtArgs.CountArgs() == 2);
assert(call->gtArgs.CountUserArgs() == 2);
// The call has the following signature:
//
// type = call(genericCtx, signatureCns);
//
const GenTree* signatureNode = call->gtArgs.GetArgByIndex(1)->GetNode();
const GenTree* signatureNode = call->gtArgs.GetUserArgByIndex(1)->GetNode();
Comment thread
tannergooding marked this conversation as resolved.
if (!signatureNode->IsCnsIntOrI())
{
// We expect the signature to be a constant node here (it's marked as DONT_CSE)
Expand Down Expand Up @@ -260,7 +260,7 @@ bool Compiler::fgExpandRuntimeLookupsForCall(BasicBlock** pBlock, Statement* stm
gtUpdateStmtSideEffects(stmt);
}

GenTree* ctxTree = call->gtArgs.GetArgByIndex(0)->GetNode();
GenTree* ctxTree = call->gtArgs.GetUserArgByIndex(0)->GetNode();

// Prepare slotPtr tree (TODO: consider sharing this part with impRuntimeLookup)
GenTree* slotPtrTree = gtCloneExpr(ctxTree);
Expand Down Expand Up @@ -872,7 +872,7 @@ bool Compiler::fgExpandThreadLocalAccessForCall(BasicBlock** pBlock, Statement*
JITDUMP("offsetOfThreadStaticBlocks= %u\n", dspOffset(threadStaticBlocksInfo.offsetOfThreadStaticBlocks));
JITDUMP("offsetOfBaseOfThreadLocalData= %u\n", dspOffset(threadStaticBlocksInfo.offsetOfBaseOfThreadLocalData));

assert(call->gtArgs.CountArgs() == 1);
assert(call->gtArgs.CountUserArgs() == 1);

// Split block right before the call tree
BasicBlock* prevBb = block;
Expand Down Expand Up @@ -1020,7 +1020,7 @@ bool Compiler::fgExpandThreadLocalAccessForCall(BasicBlock** pBlock, Statement*
// Cache the tls value
tlsValueDef = gtNewStoreLclVarNode(tlsLclNum, tlsValue);
GenTree* tlsLclValueUse = gtNewLclVarNode(tlsLclNum);
GenTree* typeThreadStaticBlockIndexValue = call->gtArgs.GetArgByIndex(0)->GetNode();
GenTree* typeThreadStaticBlockIndexValue = call->gtArgs.GetUserArgByIndex(0)->GetNode();
assert(genActualType(typeThreadStaticBlockIndexValue) == TYP_INT);

if (helper == CORINFO_HELP_GETDYNAMIC_NONGCTHREADSTATIC_BASE_NOCTOR_OPTIMIZED2)
Expand Down Expand Up @@ -2902,15 +2902,15 @@ bool Compiler::fgExpandStackArrayAllocation(BasicBlock* block, Statement* stmt,

// Initialize the array method table pointer.
//
GenTree* const mt = call->gtArgs.GetArgByIndex(typeArgIndex)->GetNode();
GenTree* const mt = call->gtArgs.GetUserArgByIndex(typeArgIndex)->GetNode();
GenTree* const mtStore = gtNewStoreValueNode(TYP_I_IMPL, stackLocalAddress, mt);
Statement* const mtStmt = fgNewStmtFromTree(mtStore);

fgInsertStmtBefore(block, stmt, mtStmt);

// Initialize the array length.
//
GenTree* const lengthArg = call->gtArgs.GetArgByIndex(lengthArgIndex)->GetNode();
GenTree* const lengthArg = call->gtArgs.GetUserArgByIndex(lengthArgIndex)->GetNode();
GenTree* const lengthArgInt = fgOptimizeCast(gtNewCastNode(TYP_INT, lengthArg, false, TYP_INT));
GenTree* const lengthAddress = gtNewOperNode(GT_ADD, TYP_I_IMPL, gtCloneExpr(stackLocalAddress),
gtNewIconNode(OFFSETOF__CORINFO_Array__length, TYP_I_IMPL));
Expand Down
Loading