summaryrefslogtreecommitdiff
path: root/src/jit/rangecheck.cpp
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2017-04-13 14:17:19 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2017-04-13 14:17:19 +0900
commita56e30c8d33048216567753d9d3fefc2152af8ac (patch)
tree7e5d979695fc4a431740982eb1cfecc2898b23a5 /src/jit/rangecheck.cpp
parent4b11dc566a5bbfa1378d6266525c281b028abcc8 (diff)
downloadcoreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.gz
coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.bz2
coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.zip
Imported Upstream version 2.0.0.11353upstream/2.0.0.11353
Diffstat (limited to 'src/jit/rangecheck.cpp')
-rw-r--r--src/jit/rangecheck.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/jit/rangecheck.cpp b/src/jit/rangecheck.cpp
index 8d16cce31a..91ae81e322 100644
--- a/src/jit/rangecheck.cpp
+++ b/src/jit/rangecheck.cpp
@@ -506,7 +506,7 @@ void RangeCheck::MergeEdgeAssertions(GenTreePtr tree, const ASSERT_VALARG_TP ass
{
index++;
- Compiler::AssertionDsc* curAssertion = m_pCompiler->optGetAssertion((Compiler::AssertionIndex)index);
+ Compiler::AssertionDsc* curAssertion = m_pCompiler->optGetAssertion((AssertionIndex)index);
// Current assertion is about array length.
if (!curAssertion->IsArrLenArithBound() && !curAssertion->IsArrLenBound() && !curAssertion->IsConstantBound())
@@ -517,7 +517,7 @@ void RangeCheck::MergeEdgeAssertions(GenTreePtr tree, const ASSERT_VALARG_TP ass
#ifdef DEBUG
if (m_pCompiler->verbose)
{
- m_pCompiler->optPrintAssertion(curAssertion, (Compiler::AssertionIndex)index);
+ m_pCompiler->optPrintAssertion(curAssertion, (AssertionIndex)index);
}
#endif
@@ -617,7 +617,7 @@ void RangeCheck::MergeEdgeAssertions(GenTreePtr tree, const ASSERT_VALARG_TP ass
#ifdef DEBUG
if (m_pCompiler->verbose)
{
- m_pCompiler->optPrintAssertion(curAssertion, (Compiler::AssertionIndex)index);
+ m_pCompiler->optPrintAssertion(curAssertion, (AssertionIndex)index);
}
#endif
@@ -869,10 +869,13 @@ Range RangeCheck::ComputeRangeForLocalDef(
case GT_ASG:
{
Range range = GetRange(loc->block, loc->stmt, asg->gtGetOp2(), path, monotonic DEBUGARG(indent));
- JITDUMP("Merge assertions from BB%02d:%s for assignment about %p\n", block->bbNum,
- BitVecOps::ToString(m_pCompiler->apTraits, block->bbAssertionIn), dspPtr(asg->gtGetOp1()));
- MergeEdgeAssertions(asg->gtGetOp1(), block->bbAssertionIn, &range);
- JITDUMP("done merging\n");
+ if (!BitVecOps::MayBeUninit(block->bbAssertionIn))
+ {
+ JITDUMP("Merge assertions from BB%02d:%s for assignment about %p\n", block->bbNum,
+ BitVecOps::ToString(m_pCompiler->apTraits, block->bbAssertionIn), dspPtr(asg->gtGetOp1()));
+ MergeEdgeAssertions(asg->gtGetOp1(), block->bbAssertionIn, &range);
+ JITDUMP("done merging\n");
+ }
return range;
}