Skip to content
Open
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
9 changes: 9 additions & 0 deletions src/coreclr/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11547,6 +11547,15 @@ void Compiler::gtUpdateStmtSideEffects(Statement* stmt)
{
GenTree* tree = *use;
tree->gtFlags &= ~(GTF_ASG | GTF_CALL | GTF_EXCEPT);

// Attempt to clear stale SIDEEFF bits
// if this node does indeed need GTF_ORDER_SIDEEFF, then the bit will later be propagated up and re-set
// during the child's post-order visit
if (!tree->OperSupportsOrderingSideEffect())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!tree->OperSupportsOrderingSideEffect())
if (((tree->gtFlags & GTF_ORDER_SIDEEFF) != 0) && !tree->OperSupportsOrderingSideEffect())

For TP

{
tree->gtFlags &= ~GTF_ORDER_SIDEEFF;
}

return WALK_CONTINUE;
}

Expand Down
Loading