Implement: ArgumentPromotion/chained.ll
authorChris Lattner <sabre@nondot.org>
Sun, 7 Mar 2004 22:52:53 +0000 (22:52 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 7 Mar 2004 22:52:53 +0000 (22:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12200 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/ArgumentPromotion.cpp

index eb4fc463e699445c8dbb038b6970511d6063ce6d..03fc54ac90a8d830e8864bf27f1ea211565d5488 100644 (file)
@@ -328,6 +328,11 @@ void ArgPromotion::DoPromotion(Function *F, std::vector<Argument*> &Args2Prom) {
         LI->replaceAllUsesWith(I2);
         LI->getParent()->getInstList().erase(LI);
       }
+
+      // If we inserted a new pointer type, it's possible that IT could be
+      // promoted too.
+      if (isa<PointerType>(I2->getType()))
+        WorkList.insert(NF);
       ++I2;
     }