diff options
author | Chris Lattner <sabre@nondot.org> | 2004-11-11 07:46:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-11-11 07:46:29 +0000 |
commit | 3e062eacab10938825b92ffdfa5bf3d9cf228c36 (patch) | |
tree | e0581f7c2b647922e6ae8100e030c9704e0b410f | |
parent | 1f7893fe05485fc7af8d50103ab05dc97e624125 (diff) |
Fix bug: IPConstantProp/deadarg.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17679 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/IPO/IPConstantPropagation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp index 479f8e73cc..9daeb4fa5d 100644 --- a/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/lib/Transforms/IPO/IPConstantPropagation.cpp @@ -113,9 +113,9 @@ bool IPCP::processFunction(Function &F) { bool MadeChange = false; for (unsigned i = 0, e = ArgumentConstants.size(); i != e; ++i, ++AI) // Do we have a constant argument!? - if (!ArgumentConstants[i].second && !AI->use_empty()) { - assert(ArgumentConstants[i].first && "Unknown constant value!"); + if (!ArgumentConstants[i].second) { Value *V = ArgumentConstants[i].first; + if (V == 0) V = UndefValue::get(AI->getType()); AI->replaceAllUsesWith(V); ++NumArgumentsProped; MadeChange = true; |