mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
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
This commit is contained in:
parent
0acd1a9d12
commit
b19797de85
@ -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: ");
|
||||
|
Loading…
Reference in New Issue
Block a user