summaryrefslogtreecommitdiff
path: root/src/jit/assertionprop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jit/assertionprop.cpp')
-rw-r--r--src/jit/assertionprop.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jit/assertionprop.cpp b/src/jit/assertionprop.cpp
index 2968820599..cb7454d29d 100644
--- a/src/jit/assertionprop.cpp
+++ b/src/jit/assertionprop.cpp
@@ -923,7 +923,8 @@ AssertionIndex Compiler::optCreateAssertion(GenTree* op1,
//
// We only perform null-checks on GC refs
- // so only make non-null assertions about GC refs
+ // so only make non-null assertions about GC refs or byrefs if we can't determine
+ // the corresponding ref.
//
if (lclVar->TypeGet() != TYP_REF)
{
@@ -957,7 +958,7 @@ AssertionIndex Compiler::optCreateAssertion(GenTree* op1,
}
}
- if (fgIsBigOffset(offset) || (vnStore->TypeOfVN(vn) != TYP_REF))
+ if (fgIsBigOffset(offset))
{
goto DONE_ASSERTION; // Don't make an assertion
}