Minor correction to r130877; fixes PR9846 and hopefully the buildbot failures.
authorEli Friedman <eli.friedman@gmail.com>
Thu, 5 May 2011 16:18:11 +0000 (16:18 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Thu, 5 May 2011 16:18:11 +0000 (16:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130925 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineCSE.cpp

index 5d79e96097e31bfb1ebd810e1e348898dbc08364..341afd9dbc6ef1e341f12cb43449618d2c5043f7 100644 (file)
@@ -468,7 +468,8 @@ bool MachineCSE::ProcessBlock(MachineBasicBlock *MBB) {
         SmallVector<unsigned,8>::iterator PI = DirectPhysRefs.begin(),
                                           PE = DirectPhysRefs.end();
         for (; PI != PE; ++PI)
-          MBB->addLiveIn(*PI);
+          if (!MBB->isLiveIn(*PI))
+            MBB->addLiveIn(*PI);
       }
       ++NumCSEs;
       if (!PhysRefs.empty())