aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-07-01 03:31:29 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-07-01 03:31:29 +0000
commit475cd405b09005f7d2b60e9ce69720fd8748f595 (patch)
tree91236574cbd6e061104a965b7943fdf6558e6933
parent59066f0da080f5e8a8d2813e54e72bc87198a553 (diff)
downloadllvm-475cd405b09005f7d2b60e9ce69720fd8748f595.zip
llvm-475cd405b09005f7d2b60e9ce69720fd8748f595.tar.gz
llvm-475cd405b09005f7d2b60e9ce69720fd8748f595.tar.bz2
Fix off by one error. I misunderstood the comment about killedAt.
llvm-svn: 134229
-rw-r--r--llvm/lib/CodeGen/RegisterCoalescer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index 76edc08..f525ccd 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -1213,7 +1213,7 @@ static bool RegistersDefinedFromSameValue(LiveIntervals &li,
// FIXME: If "B = X" kills X, we have to move the kill back to its
// previous use. For now we just avoid the optimization in that case.
- SlotIndex CopyIdx = li.getInstructionIndex(MI).getNextIndex().getDefIndex();
+ SlotIndex CopyIdx = li.getInstructionIndex(MI).getDefIndex();
LiveInterval &SrcInt = li.getInterval(Src);
if (SrcInt.killedAt(CopyIdx))
return false;