mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Handle mixed normal and early-clobber defs on inline asm.
PR14376. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168320 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -59,8 +59,16 @@ VNInfo *LiveInterval::createDeadDef(SlotIndex Def,
|
||||
return VNI;
|
||||
}
|
||||
if (SlotIndex::isSameInstr(Def, I->start)) {
|
||||
assert(I->start == Def && "Cannot insert def, already live");
|
||||
assert(I->valno->def == Def && "Inconsistent existing value def");
|
||||
assert(I->valno->def == I->start && "Inconsistent existing value def");
|
||||
|
||||
// It is possible to have both normal and early-clobber defs of the same
|
||||
// register on an instruction. It doesn't make a lot of sense, but it is
|
||||
// possible to specify in inline assembly.
|
||||
//
|
||||
// Just convert everything to early-clobber.
|
||||
Def = std::min(Def, I->start);
|
||||
if (Def != I->start)
|
||||
I->start = I->valno->def = Def;
|
||||
return I->valno;
|
||||
}
|
||||
assert(SlotIndex::isEarlierInstr(Def, I->start) && "Already live at def");
|
||||
|
Reference in New Issue
Block a user