diff --git a/src/coreclr/jit/assertionprop.cpp b/src/coreclr/jit/assertionprop.cpp index 6c4a631652e838..a5dd6e358aee5c 100644 --- a/src/coreclr/jit/assertionprop.cpp +++ b/src/coreclr/jit/assertionprop.cpp @@ -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); @@ -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);