This wasn't a correctness problem, but it broke the fast path for single-predecessor blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121966
91177308-0d34-0410-b5e6-
96231b3b80d8
- // Okay, now we know the most popular destination. If there is more than
+ // Okay, now we know the most popular destination. If there is more than one
// destination, we need to determine one. This is arbitrary, but we need
// to make a deterministic decision. Pick the first one that appears in the
// successor list.
// destination, we need to determine one. This is arbitrary, but we need
// to make a deterministic decision. Pick the first one that appears in the
// successor list.
}
// If we have exactly one destination, remember it for efficiency below.
}
// If we have exactly one destination, remember it for efficiency below.
+ if (PredToDestList.empty())
OnlyDest = DestBB;
else if (OnlyDest != DestBB)
OnlyDest = MultipleDestSentinel;
OnlyDest = DestBB;
else if (OnlyDest != DestBB)
OnlyDest = MultipleDestSentinel;