Skip to content

Commit

Permalink
Do not confuse fgDispBasicBlocks in fgMorphBlocks (#50703)
Browse files Browse the repository at this point in the history
The logic in "fgDispBasicBlocks" has a check for promoted implicit by-refs
that only allows them during global morph via an 'assert(fgGlobalMorph)'.
However, "fgMorphBlocks" was calling "fgDispBasicBlocks" after having set "fgGlobalMorph" to "false",
leading it to falsely believe it was not actually being called during global morph
and asserting with a message like "assertion failed 'fgGlobalMorph' - during 'Morph - Global'".
Fix this by setting "fgGlobalMorph" to "false" at the very end of "fgMorphBlocks".
  • Loading branch information
SingleAccretion authored Apr 6, 2021
1 parent bdd7ca0 commit bc8be66
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/coreclr/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10610,7 +10610,6 @@ void Compiler::gtDispNode(GenTree* tree, IndentStack* indentStack, __in __in_z _
{
// Promoted implicit by-refs can have this state during
// global morph while they are being rewritten
assert(fgGlobalMorph);
printf("(P?!)"); // Promoted struct
}
}
Expand Down Expand Up @@ -11310,7 +11309,6 @@ void Compiler::gtDispLeaf(GenTree* tree, IndentStack* indentStack)
{
// Promoted implicit byrefs can get in this state while they are being rewritten
// in global morph.
assert(fgGlobalMorph);
}
else
{
Expand Down

0 comments on commit bc8be66

Please sign in to comment.