summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-01-06 00:09:23 +0000
committerBill Wendling <isanbard@gmail.com>2010-01-06 00:09:23 +0000
commit578865ff3d2dcdd79f4df4329703c262920de5dc (patch)
tree0e0a75f5e54e01239aeed769af386a99c25db74d /llvm/lib/CodeGen/SelectionDAG
parent0a7056fe52724d9da0ee691e770e5500ac2bb584 (diff)
downloadbcm5719-llvm-578865ff3d2dcdd79f4df4329703c262920de5dc.tar.gz
bcm5719-llvm-578865ff3d2dcdd79f4df4329703c262920de5dc.zip
Only check the ordering if there is an ordering for each nodes.
llvm-svn: 92807
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index 1ad7919962b..4d51f0c13e8 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
@@ -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);
OpenPOWER on IntegriCloud