From: Chris Lattner Date: Thu, 18 Nov 2004 01:34:44 +0000 (+0000) Subject: Fix a minor bug in expiredAt. endNumber() is the first number that is not valid. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8d8d513d4dcd4d98b92ccce10a9907086af28f1e;p=oota-llvm.git Fix a minor bug in expiredAt. endNumber() is the first number that is not valid. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17931 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index 87cb570306c..2784ba7f2b1 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -110,7 +110,7 @@ namespace llvm { } bool expiredAt(unsigned index) const { - return endNumber() <= (index + 1); + return index >= endNumber(); } bool liveAt(unsigned index) const; diff --git a/lib/CodeGen/LiveInterval.h b/lib/CodeGen/LiveInterval.h index 87cb570306c..2784ba7f2b1 100644 --- a/lib/CodeGen/LiveInterval.h +++ b/lib/CodeGen/LiveInterval.h @@ -110,7 +110,7 @@ namespace llvm { } bool expiredAt(unsigned index) const { - return endNumber() <= (index + 1); + return index >= endNumber(); } bool liveAt(unsigned index) const;