Allow kill flags on two-address instructions. They are harmless.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128643 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2011-03-31 17:52:41 +00:00
parent 8e53aca51a
commit 02ae9f2f27

View File

@ -610,13 +610,9 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum) {
if (MI->isRegTiedToDefOperand(MONum, &defIdx)) {
// A two-addr use counts as a kill if use and def are the same.
unsigned DefReg = MI->getOperand(defIdx).getReg();
if (Reg == DefReg) {
if (Reg == DefReg)
isKill = true;
// And in that case an explicit kill flag is not allowed.
if (MO->isKill())
report("Illegal kill flag on two-address instruction operand",
MO, MONum);
} else if (TargetRegisterInfo::isPhysicalRegister(Reg)) {
else if (TargetRegisterInfo::isPhysicalRegister(Reg)) {
report("Two-address instruction operands must be identical",
MO, MONum);
}