[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

Chris Lattner lattner at persephone.cs.uiuc.edu
Thu Nov 4 20:46:07 PST 2004



Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.278 -> 1.279
---
Log message:

Fix some warnings on VC++


---
Diffs of the changes:  (+1 -3)

Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.278 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.279
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.278	Mon Nov  1 21:50:32 2004
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Thu Nov  4 22:45:43 2004
@@ -572,7 +572,7 @@
     if (ConstantInt *CI = dyn_cast<ConstantInt>(RHSC)) {
       unsigned NumBits = CI->getType()->getPrimitiveSize()*8;
       uint64_t Val = CI->getRawValue() & (1ULL << NumBits)-1;
-      if (Val == (1ULL << NumBits-1))
+      if (Val == (1ULL << (NumBits-1)))
         return BinaryOperator::createXor(LHS, RHS);
     }
 
@@ -3457,7 +3457,6 @@
                                       InstCombiner *IC) {
   unsigned PS = IC->getTargetData().getPointerSize();
   const Type *VTy = V->getType();
-  Instruction *Cast;
   if (!VTy->isSigned() && VTy->getPrimitiveSize() < PS)
     // We must insert a cast to ensure we sign-extend.
     V = IC->InsertNewInstBefore(new CastInst(V, VTy->getSignedVersion(),
@@ -3591,7 +3590,6 @@
             GO1 = ConstantExpr::getCast(GO1C, SO1->getType());
           } else {
             unsigned PS = TD->getPointerSize();
-            Instruction *Cast;
             if (SO1->getType()->getPrimitiveSize() == PS) {
               // Convert GO1 to SO1's type.
               GO1 = InsertSignExtendToPtrTy(GO1, SO1->getType(), &GEP, this);






More information about the llvm-commits mailing list