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
10 changes: 9 additions & 1 deletion src/coreclr/jit/objectalloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4043,8 +4043,16 @@ bool ObjectAllocator::CheckCanClone(CloneInfo* info)
{
BasicBlock* const predBlock = predEdge->getSourceBlock();

// We may see unreachable pred blocks here. If so we will
// conservatively fail.
//
Copy link

Copilot AI Jun 26, 2025

Choose a reason for hiding this comment

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

[nitpick] The standalone // line adds noise without additional context. Consider removing it or merging it with adjacent comment lines for clarity.

Suggested change
//

Copilot uses AI. Check for mistakes.

if (!comp->m_dfsTree->Contains(predBlock))
{
JITDUMP("Unreachable pred block " FMT_BB " for " FMT_BB "\n", predBlock->bbNum, block->bbNum);
return false;
}

// We should not be able to reach an un-dominated block.
// (consider eh paths?)
//
assert(comp->m_domTree->Dominates(defBlock, predBlock));
if (BitVecOps::TryAddElemD(&traits, visitedBlocks, predBlock->bbID))
Expand Down
Loading