Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/coreclr/jit/morphblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ GenTree* MorphInitBlockHelper::Morph()
assert(m_result != nullptr);

#ifdef DEBUG
if (m_result != m_asg)
// If we are going to return a different node than the input then morph
// expects us to have set GTF_DEBUG_NODE_MORPHED.
if ((m_result != m_asg) || (sideEffects != nullptr))
{
m_result->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
}
Expand All @@ -158,6 +160,7 @@ GenTree* MorphInitBlockHelper::Morph()
commaPool = commaPool->gtNext;

assert(comma->OperIs(GT_COMMA));
comma->gtType = m_result->TypeGet();
comma->AsOp()->gtOp1 = sideEffects;
comma->AsOp()->gtOp2 = m_result;
comma->gtFlags = (sideEffects->gtFlags | m_result->gtFlags) & GTF_ALL_EFFECT;
Expand Down