[llvm-commits] [llvm] r80731 - /llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp

Bob Wilson bob.wilson at apple.com
Tue Sep 1 15:19:01 PDT 2009


Author: bwilson
Date: Tue Sep  1 17:19:00 2009
New Revision: 80731

URL: http://llvm.org/viewvc/llvm-project?rev=80731&view=rev
Log:
Move use of LV inside condition that guards for null LV.

Modified:
    llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp

Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=80731&r1=80730&r2=80731&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Tue Sep  1 17:19:00 2009
@@ -865,12 +865,12 @@
                       LV->addVirtualRegisterKilled(Kill, NewKill);
                   }
                 }
-              }
 
-              // We're really going to nuke the old inst. If regB was marked
-              // as a kill we need to update its Kills list.
-              if (mi->getOperand(si).isKill())
-                LV->removeVirtualRegisterKilled(regB, mi);
+                // We're really going to nuke the old inst. If regB was marked
+                // as a kill we need to update its Kills list.
+                if (mi->getOperand(si).isKill())
+                  LV->removeVirtualRegisterKilled(regB, mi);
+              }
 
               mbbi->erase(mi); // Nuke the old inst.
               mi = nmi;





More information about the llvm-commits mailing list