Skip to content

Commit c9040a2

Browse files
committed
do not use vnf, but only use useEnclosingTypeAsArg0
1 parent ab95bb9 commit c9040a2

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/coreclr/jit/valuenum.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12301,7 +12301,7 @@ void Compiler::fgValueNumberHelperCallFunc(GenTreeCall* call, VNFunc vnf, ValueN
1230112301
CallArgs* args = &call->gtArgs;
1230212302
bool generateUniqueVN = false;
1230312303
bool useEntryPointAddrAsArg0 = false;
12304-
bool useEnclosingTypeAsArg0 = call->IsArgNeedsEnclosingType();
12304+
bool useEnclosingTypeAsArg0 = false;
1230512305

1230612306
switch (vnf)
1230712307
{
@@ -12367,8 +12367,15 @@ void Compiler::fgValueNumberHelperCallFunc(GenTreeCall* call, VNFunc vnf, ValueN
1236712367
if (IsTargetAbi(CORINFO_NATIVEAOT_ABI))
1236812368
{
1236912369
// TODO: Do this for R2R as well
12370-
vnf = VNF_ReadyToRunStaticBaseCommon;
12371-
assert(useEnclosingTypeAsArg0 || (call->gtInitClsHnd == NO_CLASS_HANDLE));
12370+
if (call->IsArgNeedsEnclosingType())
12371+
{
12372+
useEnclosingTypeAsArg0 = true;
12373+
assert((call->gtInitClsHnd != NO_CLASS_HANDLE) && ((ssize_t)call->gtInitClsHnd != 0xcccccccc));
12374+
}
12375+
else
12376+
{
12377+
useEntryPointAddrAsArg0 = true;
12378+
}
1237212379
}
1237312380
else
1237412381
{

src/coreclr/jit/valuenumfuncs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ ValueNumFuncDef(GetsharedGcstaticBase, 2, false, true, true, false)
119119
ValueNumFuncDef(GetsharedNongcstaticBase, 2, false, true, true, false)
120120
ValueNumFuncDef(GetsharedGcstaticBaseNoctor, 1, false, true, true, false)
121121
ValueNumFuncDef(GetsharedNongcstaticBaseNoctor, 1, false, true, true, false)
122-
ValueNumFuncDef(ReadyToRunStaticBaseCommon, 1, false, true, true, false)
123122
ValueNumFuncDef(ReadyToRunStaticBaseGC, 1, false, true, true, false)
124123
ValueNumFuncDef(ReadyToRunStaticBaseNonGC, 1, false, true, true, false)
125124
ValueNumFuncDef(ReadyToRunStaticBaseThread, 1, false, true, true, false)

0 commit comments

Comments
 (0)