Implement: ArgumentPromotion/chained.ll

llvm-svn: 12200
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
index eb4fc46..03fc54a 100644
--- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -328,6 +328,11 @@
         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;
     }