Allow kill flags on two-address instructions. They are harmless.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 31 Mar 2011 17:52:41 +0000 (17:52 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 31 Mar 2011 17:52:41 +0000 (17:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128643 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineVerifier.cpp

index e78ca9bbb089a690c00c5bcb21da41697a6e6915..a47709edb10417119b3c5f79f97e0f18ea7d2d8c 100644 (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);
         }