Skip to content
Closed
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: 3 additions & 2 deletions src/coreclr/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4366,9 +4366,10 @@ unsigned Compiler::gtSetEvalOrder(GenTree* tree)
tryToSwap = (level < lvl2);
}

// Try to force extra swapping when in the stress mode:
// Try to force extra swapping when in the stress mode, unless stmt list is already threaded,
// in that case the user can unexpect invalid gtPrev/gtNext after calling this function.
if (compStressCompile(STRESS_REVERSE_FLAG, 60) && ((tree->gtFlags & GTF_REVERSE_OPS) == 0) &&
((op2->OperKind() & GTK_CONST) == 0))
((op2->OperKind() & GTK_CONST) == 0) && !fgStmtListThreaded)
{
tryToSwap = true;
}
Expand Down