From: Sergey Andreenko Date: Fri, 3 Nov 2017 03:08:27 +0000 (-0700) Subject: fix (#14837) X-Git-Tag: accepted/tizen/base/20180629.140029~696 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b50e97ca32e734dab00f9b8e1d3d7ef5a8f60d5;p=platform%2Fupstream%2Fcoreclr.git fix (#14837) GTF_RET means that this flag is valid only for GTF_RET node, but this check was missed. The issue was in collision between GTF_RET_MERGED and GTF_CALL_UNMANAGED. --- diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp index 9d6d0d3..a881d34 100644 --- a/src/jit/morph.cpp +++ b/src/jit/morph.cpp @@ -16882,7 +16882,7 @@ void Compiler::fgMorphBlocks() GenTreePtr last = (block->bbTreeList != nullptr) ? block->bbTreeList->gtPrev : nullptr; GenTreePtr ret = (last != nullptr) ? last->gtStmt.gtStmtExpr : nullptr; - if ((ret != nullptr) && ((ret->gtFlags & GTF_RET_MERGED) != 0)) + if ((ret != nullptr) && (ret->OperGet() == GT_RETURN) && ((ret->gtFlags & GTF_RET_MERGED) != 0)) { // This return was generated during epilog merging, so leave it alone }