summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-06-18 17:37:34 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-06-18 17:37:34 +0000
commit4fdd96c4e0a8e9d3d9d8167bfe750aee941a7b98 (patch)
treed2d0a279c0c14707d62557be306874141b6b52b6 /llvm/lib/Transforms
parent1fb9d0191911979caa145a88bd61ccd9adbb093f (diff)
downloadbcm5719-llvm-4fdd96c4e0a8e9d3d9d8167bfe750aee941a7b98.tar.gz
bcm5719-llvm-4fdd96c4e0a8e9d3d9d8167bfe750aee941a7b98.zip
Clean up some uninitialized variables and missing return statements that
GCC 4.0.0 compiler (sometimes incorrectly) warns about under release build. llvm-svn: 22249
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 83998c8bc2d..55dd09846e6 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -757,7 +757,7 @@ Instruction *InstCombiner::visitSub(BinaryOperator &I) {
return BinaryOperator::createNot(Op1);
// C - ~X == X + (1+C)
- Value *X;
+ Value *X = 0;
if (match(Op1, m_Not(m_Value(X))))
return BinaryOperator::createAdd(X,
ConstantExpr::getAdd(C, ConstantInt::get(I.getType(), 1)));
@@ -852,7 +852,7 @@ Instruction *InstCombiner::visitSub(BinaryOperator &I) {
ConstantExpr::getNeg(DivRHS));
// X - X*C --> X * (1-C)
- ConstantInt *C2;
+ ConstantInt *C2 = 0;
if (dyn_castFoldableMul(Op1I, C2) == Op0) {
Constant *CP1 =
ConstantExpr::getSub(ConstantInt::get(I.getType(), 1), C2);
@@ -5129,7 +5129,7 @@ Instruction *InstCombiner::visitStoreInst(StoreInst &SI) {
Instruction *InstCombiner::visitBranchInst(BranchInst &BI) {
// Change br (not X), label True, label False to: br X, label False, True
- Value *X;
+ Value *X = 0;
BasicBlock *TrueDest;
BasicBlock *FalseDest;
if (match(&BI, m_Br(m_Not(m_Value(X)), TrueDest, FalseDest)) &&
OpenPOWER on IntegriCloud