mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-29 13:32:33 +00:00
Correctly terminate a physreg redefined by an early clobber.
I don't have a test that fails because of this, but a test case like CodeGen/X86/2009-12-01-EarlyClobberBug.ll exposes the problem. EAX is redefined by a tied early clobber operand on inline asm, and the live range should look like this: %EAX,inf = [48r,64e:0)[64e,80r:1) 0@48r 1@64e Previously, the two values got merged: %EAX,inf = [48r,80r:0) 0@48r With this bug fixed, the REDEF_BY_EC VNInfo flag is no longer needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149768 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c0dc1b7f97
commit
7e899cbb91
@ -402,7 +402,7 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock *MBB,
|
||||
if (DefIdx != -1) {
|
||||
if (mi->isRegTiedToUseOperand(DefIdx)) {
|
||||
// Two-address instruction.
|
||||
end = baseIndex.getRegSlot();
|
||||
end = baseIndex.getRegSlot(mi->getOperand(DefIdx).isEarlyClobber());
|
||||
} else {
|
||||
// Another instruction redefines the register before it is ever read.
|
||||
// Then the register is essentially dead at the instruction that
|
||||
|
Loading…
x
Reference in New Issue
Block a user