aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/LiveRangeEdit.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveRangeEdit.h b/lib/CodeGen/LiveRangeEdit.h
index 3230a2e9fc..7acf9e0a94 100644
--- a/lib/CodeGen/LiveRangeEdit.h
+++ b/lib/CodeGen/LiveRangeEdit.h
@@ -78,7 +78,7 @@ public:
iterator begin() const { return newRegs_.begin()+firstNew_; }
iterator end() const { return newRegs_.end(); }
unsigned size() const { return newRegs_.size()-firstNew_; }
- LiveInterval *get(unsigned idx) const { return newRegs_[idx-firstNew_]; }
+ LiveInterval *get(unsigned idx) const { return newRegs_[idx+firstNew_]; }
/// assignStackSlot - Ensure a stack slot is assigned to parent.
/// @return the assigned stack slot number.