diff options
author | Chris Lattner <sabre@nondot.org> | 2004-11-05 04:45:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-11-05 04:45:43 +0000 |
commit | f158092801cc5c627408153169d2ab8c990c7893 (patch) | |
tree | 3671f1f5751c7fc9d21dbc6f84b47893020bdd1a /lib/Transforms | |
parent | 1464467f9e00f1cf82697e65b905659a2b3a9078 (diff) | |
download | llvm-f158092801cc5c627408153169d2ab8c990c7893.tar.gz llvm-f158092801cc5c627408153169d2ab8c990c7893.tar.bz2 llvm-f158092801cc5c627408153169d2ab8c990c7893.tar.xz |
Fix some warnings on VC++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 9274a4259c..6689039fbe 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -572,7 +572,7 @@ Instruction *InstCombiner::visitAdd(BinaryOperator &I) { 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 @@ static Value *InsertSignExtendToPtrTy(Value *V, const Type *DTy, 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 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) { 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); |