[llvm-commits] CVS: llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Nov 10 23:46:41 PST 2004
Changes in directory llvm/lib/Transforms/IPO:
IPConstantPropagation.cpp updated: 1.11 -> 1.12
---
Log message:
Fix bug: IPConstantProp/deadarg.ll
---
Diffs of the changes: (+2 -2)
Index: llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
diff -u llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.11 llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.12
--- llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.11 Wed Nov 10 13:43:59 2004
+++ llvm/lib/Transforms/IPO/IPConstantPropagation.cpp Thu Nov 11 01:46:29 2004
@@ -113,9 +113,9 @@
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;
More information about the llvm-commits
mailing list