summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Analysis/LoopPass.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp
index 26e50615640..4d2e2906082 100644
--- a/llvm/lib/Analysis/LoopPass.cpp
+++ b/llvm/lib/Analysis/LoopPass.cpp
@@ -26,7 +26,8 @@ namespace llvm {
class LoopCompare {
public:
bool operator()( Loop *L1, Loop *L2) const {
- return L1->getLoopDepth() > L2->getLoopDepth();
+ // Loops with highest depth has the highest priority.
+ return L1->getLoopDepth() < L2->getLoopDepth();
}
};
OpenPOWER on IntegriCloud