With the DetectDeadLanes pass in place we cannot run into situations
anymore where defs suddenly become dead.
Also add a missing check so we do not try to add an undef flag to a
physreg (found by visual inspection, no failing test).
llvm-svn: 267976
LaneBitmask LaneMask = I->LaneMask & LiveAfter;
if (LaneMask == 0) {
I = Defs.erase(I);
- // Make sure the operand is properly marked as Dead.
- if (AddFlagsMI != nullptr)
- AddFlagsMI->addRegisterDead(RegUnit, MRI.getTargetRegisterInfo());
} else {
I->LaneMask = LaneMask;
++I;
if (AddFlagsMI != nullptr) {
for (const RegisterMaskPair &P : DeadDefs) {
unsigned RegUnit = P.RegUnit;
+ if (!TargetRegisterInfo::isVirtualRegister(RegUnit))
+ continue;
LaneBitmask LiveAfter = getLiveLanesAt(LIS, MRI, true, RegUnit,
Pos.getDeadSlot());
if (LiveAfter == 0)