mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
Also verify the def index for early clobbers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159039 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
670712ca3f
commit
f935e945c0
@ -866,12 +866,13 @@ void MachineVerifier::checkLiveness(const MachineOperand *MO, unsigned MONum) {
|
||||
// Check LiveInts for a live range, but only for virtual registers.
|
||||
if (LiveInts && TargetRegisterInfo::isVirtualRegister(Reg) &&
|
||||
!LiveInts->isNotInMIMap(MI)) {
|
||||
SlotIndex DefIdx = LiveInts->getInstructionIndex(MI).getRegSlot();
|
||||
SlotIndex DefIdx = LiveInts->getInstructionIndex(MI);
|
||||
DefIdx = DefIdx.getRegSlot(MO->isEarlyClobber());
|
||||
if (LiveInts->hasInterval(Reg)) {
|
||||
const LiveInterval &LI = LiveInts->getInterval(Reg);
|
||||
if (const VNInfo *VNI = LI.getVNInfoAt(DefIdx)) {
|
||||
assert(VNI && "NULL valno is not allowed");
|
||||
if (VNI->def != DefIdx && !MO->isEarlyClobber()) {
|
||||
if (VNI->def != DefIdx) {
|
||||
report("Inconsistent valno->def", MO, MONum);
|
||||
*OS << "Valno " << VNI->id << " is not defined at "
|
||||
<< DefIdx << " in " << LI << '\n';
|
||||
|
Loading…
Reference in New Issue
Block a user