mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Also verify the def index for early clobbers.
llvm-svn: 159039
This commit is contained in:
parent
25837f2c81
commit
f3226a960c
@ -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