diff options
author | Sergey Andreenko <seandree@microsoft.com> | 2019-03-26 15:34:24 -0700 |
---|---|---|
committer | Sergey Andreenko <seandree@microsoft.com> | 2019-04-09 13:59:27 -0700 |
commit | b07b72627c9fe2807913df47451f9e26973d1023 (patch) | |
tree | 0834208cc58f7fa0720c729041c6aa9609157ada /src/jit/assertionprop.cpp | |
parent | 5608b4ff0f81b99a5d436dec1e23b393503a4e07 (diff) | |
download | coreclr-b07b72627c9fe2807913df47451f9e26973d1023.tar.gz coreclr-b07b72627c9fe2807913df47451f9e26973d1023.tar.bz2 coreclr-b07b72627c9fe2807913df47451f9e26973d1023.zip |
Delete condition that was previously checked with noway_assert.
Diffstat (limited to 'src/jit/assertionprop.cpp')
-rw-r--r-- | src/jit/assertionprop.cpp | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/src/jit/assertionprop.cpp b/src/jit/assertionprop.cpp index 8bb8ce4418..0e88310c6b 100644 --- a/src/jit/assertionprop.cpp +++ b/src/jit/assertionprop.cpp @@ -3897,7 +3897,8 @@ GenTree* Compiler::optAssertionProp_BndsChk(ASSERT_VALARG_TP assertions, GenTree GenTree* Compiler::optAssertionProp_Update(GenTree* newTree, GenTree* tree, GenTreeStmt* stmt) { - noway_assert(newTree != nullptr); + assert(newTree != nullptr); + assert(tree != nullptr); if (stmt == nullptr) { @@ -3908,33 +3909,20 @@ GenTree* Compiler::optAssertionProp_Update(GenTree* newTree, GenTree* tree, GenT noway_assert(!optLocalAssertionProp); // If newTree == tree then we modified the tree in-place otherwise we have to - // locate our parent node and update it so that it points to newTree + // locate our parent node and update it so that it points to newTree. if (newTree != tree) { GenTree** link = gtFindLink(stmt, tree); -#ifdef DEBUG - if (link == nullptr) - { - noway_assert(!"gtFindLink failed!"); - printf("\nCould not find parent of:\n"); - gtDispTree(tree); - printf("\nIn this stmt:\n"); - gtDispTree(stmt); - } -#endif noway_assert(link != nullptr); - noway_assert(tree != nullptr); - if (link != nullptr) - { - // Replace the old operand with the newTree - *link = newTree; - // We only need to ensure that the gtNext field is set as it is used to traverse - // to the next node in the tree. We will re-morph this entire statement in - // optAssertionPropMain(). It will reset the gtPrev and gtNext links for all nodes. + // Replace the old operand with the newTree + *link = newTree; + + // We only need to ensure that the gtNext field is set as it is used to traverse + // to the next node in the tree. We will re-morph this entire statement in + // optAssertionPropMain(). It will reset the gtPrev and gtNext links for all nodes. + newTree->gtNext = tree->gtNext; - newTree->gtNext = tree->gtNext; - } } } |