[llvm-commits] CVS: llvm/lib/Transforms/Scalar/SCCP.cpp
Chris Lattner
sabre at nondot.org
Fri Oct 20 13:19:28 PDT 2006
Changes in directory llvm/lib/Transforms/Scalar:
SCCP.cpp updated: 1.132 -> 1.133
---
Log message:
Fix an ugly problem in SCCP. This fixes Benchmarks/Misc-C++/mandel-text.cpp
---
Diffs of the changes: (+3 -2)
SCCP.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Index: llvm/lib/Transforms/Scalar/SCCP.cpp
diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.132 llvm/lib/Transforms/Scalar/SCCP.cpp:1.133
--- llvm/lib/Transforms/Scalar/SCCP.cpp:1.132 Thu Sep 28 18:35:21 2006
+++ llvm/lib/Transforms/Scalar/SCCP.cpp Fri Oct 20 15:19:08 2006
@@ -1032,7 +1032,7 @@
if (BI->isConditional()) {
LatticeVal &BCValue = getValueState(BI->getCondition());
if (BCValue.isUndefined()) {
- BI->setCondition(ConstantBool::getTrue());
+ BCValue.markOverdefined();
BranchesResolved = true;
visit(BI);
}
@@ -1041,7 +1041,8 @@
LatticeVal &SCValue = getValueState(SI->getCondition());
if (SCValue.isUndefined()) {
const Type *CondTy = SI->getCondition()->getType();
- SI->setCondition(Constant::getNullValue(CondTy));
+ // Pick and arbitrary direction for the switch to go.
+ SCValue.markOverdefined();
BranchesResolved = true;
visit(SI);
}
More information about the llvm-commits
mailing list