diff options
Diffstat (limited to 'llvm/lib')
4 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/Target/PowerPC/PowerPCBranchSelector.cpp b/llvm/lib/Target/PowerPC/PowerPCBranchSelector.cpp index 7ace3c10d43..fdf1dd338a7 100644 --- a/llvm/lib/Target/PowerPC/PowerPCBranchSelector.cpp +++ b/llvm/lib/Target/PowerPC/PowerPCBranchSelector.cpp @@ -43,8 +43,9 @@ namespace {        case PPC::IMPLICIT_DEF: // no asm emitted          return 0;        default: -        return 4; // PowerPC instructions are all 4 bytes +        break;        } +      return 4; // PowerPC instructions are all 4 bytes      }      virtual bool runOnMachineFunction(MachineFunction &Fn) { diff --git a/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp b/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp index ef3f9e09e45..be1baa3fe00 100644 --- a/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp +++ b/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp @@ -2915,8 +2915,9 @@ extern bool ThisIsAChainRule(int eruleno) {        return true; break;      default: -      return false; break; +      break;      } +  return false;   }  /// GetInstructionsByRule - Choose machine instructions for the diff --git a/llvm/lib/Target/SparcV9/SparcV9CodeEmitter.cpp b/llvm/lib/Target/SparcV9/SparcV9CodeEmitter.cpp index 06131616342..d977ff94ca3 100644 --- a/llvm/lib/Target/SparcV9/SparcV9CodeEmitter.cpp +++ b/llvm/lib/Target/SparcV9/SparcV9CodeEmitter.cpp @@ -56,7 +56,7 @@ unsigned  SparcV9CodeEmitter::getRealRegNum(unsigned fakeReg,                                    MachineInstr &MI) {    const SparcV9RegInfo &RI = *TM.getRegInfo(); -  unsigned regClass, regType = RI.getRegType(fakeReg); +  unsigned regClass = 0, regType = RI.getRegType(fakeReg);    // At least map fakeReg into its class    fakeReg = RI.getClassRegNum(fakeReg, regClass); 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)) &&  | 

