summaryrefslogtreecommitdiff
path: root/lib/CodeGen/InlineSpiller.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-18 05:31:59 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-18 05:31:59 +0000
commit7941350101bdfa3b016dd8a5347a92064947dd31 (patch)
tree051096206ab78a2835e440a3c47d47b4522ff84c /lib/CodeGen/InlineSpiller.cpp
parentd13243096709a581208d461af1b91e44158fd416 (diff)
downloadllvm-7941350101bdfa3b016dd8a5347a92064947dd31.tar.gz
llvm-7941350101bdfa3b016dd8a5347a92064947dd31.tar.bz2
llvm-7941350101bdfa3b016dd8a5347a92064947dd31.tar.xz
Fix PR10387.
When trying to rematerialize a value before an instruction that has an early-clobber redefine of the virtual register, make sure to look up the correct value number. Early-clobber defs are moved one slot back, so getBaseIndex is needed to find the used value number. Bugpoint was unable to reduce the test case for this, see PR10388. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135378 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InlineSpiller.cpp')
-rw-r--r--lib/CodeGen/InlineSpiller.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/InlineSpiller.cpp b/lib/CodeGen/InlineSpiller.cpp
index 5547f735ba..f0f69872b0 100644
--- a/lib/CodeGen/InlineSpiller.cpp
+++ b/lib/CodeGen/InlineSpiller.cpp
@@ -637,7 +637,7 @@ void InlineSpiller::markValueUsed(LiveInterval *LI, VNInfo *VNI) {
bool InlineSpiller::reMaterializeFor(LiveInterval &VirtReg,
MachineBasicBlock::iterator MI) {
SlotIndex UseIdx = LIS.getInstructionIndex(MI).getUseIndex();
- VNInfo *ParentVNI = VirtReg.getVNInfoAt(UseIdx);
+ VNInfo *ParentVNI = VirtReg.getVNInfoAt(UseIdx.getBaseIndex());
if (!ParentVNI) {
DEBUG(dbgs() << "\tadding <undef> flags: ");