Just in case, handle something that is both a use and a def.
authorChris Lattner <sabre@nondot.org>
Wed, 19 Jan 2005 17:11:51 +0000 (17:11 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 19 Jan 2005 17:11:51 +0000 (17:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19696 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LiveVariables.cpp

index 291cc7934a4b17fd86b5173d40f4c3ed4b421b07..803161026012bf22c3d740791109f0ec7a5f5484 100644 (file)
@@ -310,7 +310,8 @@ void LiveVariables::instructionChanged(MachineInstr *OldMI,
         // Update the defining instruction.
         if (VI.DefInst == OldMI)
           VI.DefInst = NewMI;
-      } else if (MO.isUse()) {
+      }
+      if (MO.isUse()) {
         // If this is a kill of the value, update the VI kills list.
         if (VI.removeKill(OldMI))
           VI.Kills.push_back(NewMI);   // Yes, there was a kill of it