the pain isn't gone unless the phinodes are spilled too
authorAndrew Lenharth <andrewl@lenharth.org>
Thu, 10 Nov 2005 19:39:09 +0000 (19:39 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Thu, 10 Nov 2005 19:39:09 +0000 (19:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24288 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/Reg2Mem.cpp

index a43da7a60ac58e21dfca09043b67f868c517e37d..b04c362a25d49cc23bc824d7fd9f2658a53e9783 100644 (file)
@@ -38,7 +38,8 @@ namespace {
       BasicBlock* bb = i->getParent();
       for(Value::use_iterator ii = i->use_begin(), ie = i->use_end();
           ii != ie; ++ii)
-        if (cast<Instruction>(*ii)->getParent() != bb)
+        if (cast<Instruction>(*ii)->getParent() != bb ||
+           isa<PHINode>(*ii))
           return true;
       return false;
     }