summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-18 05:28:21 +0000
committerChris Lattner <sabre@nondot.org>2004-11-18 05:28:21 +0000
commite3b9cb995909e3db9a896f0a0f2b3931ed5fbfbf (patch)
tree0f5c6b4fee7f0f4a5e757a53b1526e3674cfa936 /llvm/lib/CodeGen
parent6e0c3f44baebdcc1255f988d3b695ee0abd9b428 (diff)
downloadbcm5719-llvm-e3b9cb995909e3db9a896f0a0f2b3931ed5fbfbf.tar.gz
bcm5719-llvm-e3b9cb995909e3db9a896f0a0f2b3931ed5fbfbf.zip
There is no need to check to see if j overflowed in this loop as we're only
incrementing i. llvm-svn: 17944
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveInterval.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp
index 80a6ed290c7..54e460f7b46 100644
--- a/llvm/lib/CodeGen/LiveInterval.cpp
+++ b/llvm/lib/CodeGen/LiveInterval.cpp
@@ -82,7 +82,9 @@ bool LiveInterval::overlapsFrom(const LiveInterval& other,
return true;
}
- while (i != ie && j != je) {
+ if (j == je) return false;
+
+ while (i != ie) {
if (i->start > j->start) {
std::swap(i, j);
std::swap(ie, je);
OpenPOWER on IntegriCloud