diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-07-18 05:31:59 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-07-18 05:31:59 +0000 |
commit | c0dd3da9c56a978b8856bb04fc1b78e698ebd896 (patch) | |
tree | c0dcc5d6a2d451f3af41e11d598a15b10fae30fe /llvm/lib/CodeGen | |
parent | 26da4ddfa6d1269731adc1432bf10fb22dde9ba7 (diff) | |
download | bcm5719-llvm-c0dd3da9c56a978b8856bb04fc1b78e698ebd896.tar.gz bcm5719-llvm-c0dd3da9c56a978b8856bb04fc1b78e698ebd896.zip |
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.
llvm-svn: 135378
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/InlineSpiller.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/InlineSpiller.cpp b/llvm/lib/CodeGen/InlineSpiller.cpp index 5547f735ba5..f0f69872b03 100644 --- a/llvm/lib/CodeGen/InlineSpiller.cpp +++ b/llvm/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: "); |