mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-18 14:31:27 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135378 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d132430967
commit
7941350101
@ -637,7 +637,7 @@ void InlineSpiller::markValueUsed(LiveInterval *LI, VNInfo *VNI) {
|
|||||||
bool InlineSpiller::reMaterializeFor(LiveInterval &VirtReg,
|
bool InlineSpiller::reMaterializeFor(LiveInterval &VirtReg,
|
||||||
MachineBasicBlock::iterator MI) {
|
MachineBasicBlock::iterator MI) {
|
||||||
SlotIndex UseIdx = LIS.getInstructionIndex(MI).getUseIndex();
|
SlotIndex UseIdx = LIS.getInstructionIndex(MI).getUseIndex();
|
||||||
VNInfo *ParentVNI = VirtReg.getVNInfoAt(UseIdx);
|
VNInfo *ParentVNI = VirtReg.getVNInfoAt(UseIdx.getBaseIndex());
|
||||||
|
|
||||||
if (!ParentVNI) {
|
if (!ParentVNI) {
|
||||||
DEBUG(dbgs() << "\tadding <undef> flags: ");
|
DEBUG(dbgs() << "\tadding <undef> flags: ");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user