[llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalOpt.cpp
Chris Lattner
sabre at nondot.org
Fri Jan 12 10:30:27 PST 2007
Changes in directory llvm/lib/Transforms/IPO:
GlobalOpt.cpp updated: 1.86 -> 1.87
---
Log message:
Branch conditions must be i1
---
Diffs of the changes: (+1 -3)
GlobalOpt.cpp | 4 +---
1 files changed, 1 insertion(+), 3 deletions(-)
Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp
diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.86 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.87
--- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.86 Thu Jan 11 22:24:45 2007
+++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Fri Jan 12 12:30:11 2007
@@ -1799,10 +1799,8 @@
} else {
ConstantInt *Cond =
dyn_cast<ConstantInt>(getVal(Values, BI->getCondition()));
+ if (!Cond) return false; // Cannot determine.
- // Cannot determine.
- if (!Cond || Cond->getType() != Type::Int1Ty)
- return false;
NewBB = BI->getSuccessor(!Cond->getZExtValue());
}
} else if (SwitchInst *SI = dyn_cast<SwitchInst>(CurInst)) {
More information about the llvm-commits
mailing list