Skip to content

Commit 3db4522

Browse files
committed
Fix "is removable field" check
1 parent 43c5724 commit 3db4522

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/coreclr/jit/fginline.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,8 @@ Statement* Compiler::fgInlinePrependStatements(InlineInfo* inlineInfo)
16081608
GenTree* op2 = argNode->AsOp()->gtOp2;
16091609
if (op1->IsCall() &&
16101610
((op1->AsCall()->gtCallMoreFlags & GTF_CALL_M_HELPER_SPECIAL_DCE) != 0) &&
1611-
(op2->OperIs(GT_IND, GT_FIELD)) && ((op2->gtFlags & GTF_EXCEPT) == 0))
1611+
op2->OperIs(GT_IND) && op2->gtGetOp1()->IsIconHandle() &&
1612+
((op2->gtFlags & GTF_EXCEPT) == 0))
16121613
{
16131614
JITDUMP("\nPerforming special dce on unused arg [%06u]:"
16141615
" actual arg [%06u] helper call [%06u]\n",

0 commit comments

Comments
 (0)