From 86a734bd40857db9ef205234f3b58e550ee5959b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 7 Mar 2004 22:52:53 +0000 Subject: [PATCH] Implement: ArgumentPromotion/chained.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12200 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/ArgumentPromotion.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index eb4fc463e69..03fc54ac90a 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -328,6 +328,11 @@ void ArgPromotion::DoPromotion(Function *F, std::vector &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(I2->getType())) + WorkList.insert(NF); ++I2; } -- 2.34.1