Only check the ordering if there is an ordering for each nodes.

llvm-svn: 92807
This commit is contained in:
Bill Wendling 2010-01-06 00:09:23 +00:00
parent b7d6746476
commit 41e18c3512

View File

@ -1129,8 +1129,8 @@ bool bu_ls_rr_sort::operator()(const SUnit *left, const SUnit *right) const {
// Prefer an ordering where the lower the non-zero order number, the higher
// the preference.
if ((LOrder || ROrder) && LOrder != ROrder)
return LOrder != 0 && (LOrder < ROrder || ROrder == 0);
if (LOrder && ROrder && LOrder != ROrder)
return LOrder < ROrder;
unsigned LPriority = SPQ->getNodePriority(left);
unsigned RPriority = SPQ->getNodePriority(right);