summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-01-06 00:23:35 +0000
committerBill Wendling <isanbard@gmail.com>2010-01-06 00:23:35 +0000
commitc075acbb54f39e7c971c34505847f59428eb0d14 (patch)
tree930e94079c490705f09098aa85767bdd47b9d48b /llvm/lib/CodeGen/SelectionDAG
parente51136ee05aa613a09aa43d5852aabebb019696e (diff)
downloadbcm5719-llvm-c075acbb54f39e7c971c34505847f59428eb0d14.tar.gz
bcm5719-llvm-c075acbb54f39e7c971c34505847f59428eb0d14.zip
The previous code could potentially cause a cycle. Allow ordering w.r.t. a 0 order.
llvm-svn: 92810
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 4d51f0c13e8..1ad7919962b 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 < ROrder;
+ if ((LOrder || ROrder) && LOrder != ROrder)
+ return LOrder != 0 && (LOrder < ROrder || ROrder == 0);
unsigned LPriority = SPQ->getNodePriority(left);
unsigned RPriority = SPQ->getNodePriority(right);
OpenPOWER on IntegriCloud