Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: make non-null assertions about all indir addr types #113772

Merged
merged 1 commit into from
Mar 22, 2025
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: 1 addition & 13 deletions src/coreclr/jit/assertionprop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1136,14 +1136,10 @@ AssertionIndex Compiler::optCreateAssertion(GenTree* op1, GenTree* op2, optAsser
}
//
// Are we trying to make a non-null assertion?
// (note we now do this for all indirs, regardless of address type)
//
else if (op2 == nullptr)
{
if (!varTypeIsGC(op1))
{
return NO_ASSERTION_INDEX; // Don't make an assertion
}

// Must be an OAK_NOT_EQUAL assertion
assert(assertionKind == OAK_NOT_EQUAL);

Expand Down Expand Up @@ -1242,14 +1238,6 @@ AssertionIndex Compiler::optCreateAssertion(GenTree* op1, GenTree* op2, optAsser
goto DONE_ASSERTION; // Don't make an assertion
}

// If the LclVar is a TYP_LONG then we only make
// assertions where op2 is also TYP_LONG
//
if ((lclVar->TypeGet() == TYP_LONG) && (op2->TypeGet() != TYP_LONG))
{
goto DONE_ASSERTION; // Don't make an assertion
}

assertion.op2.kind = op2Kind;
assertion.op2.vn = optConservativeNormalVN(op2);

Expand Down
Loading