aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-31 07:26:06 +0000
committerChris Lattner <sabre@nondot.org>2009-01-31 07:26:06 +0000
commit08d2cc70fe4733be6e5d2f2c5f37a887f36b4c17 (patch)
treed761ca9f384ce5aa0c86fe3fcf140b6a38831755
parent1e19d603e08fb5ceef8096f3833d53adc339744f (diff)
minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63477 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 6c571511e7..f084420b88 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -766,7 +766,7 @@ static void ComputeUnsignedMinMaxValuesFromKnownBits(const Type *Ty,
/// in DemandedMask. Note also that the bitwidth of V, DemandedMask, KnownZero
/// and KnownOne must all be the same.
bool InstCombiner::SimplifyDemandedBits(Value *V, APInt DemandedMask,
- APInt& KnownZero, APInt& KnownOne,
+ APInt &KnownZero, APInt &KnownOne,
unsigned Depth) {
assert(V != 0 && "Null pointer of Value???");
assert(Depth <= 6 && "Limit Search Depth");
@@ -784,7 +784,7 @@ bool InstCombiner::SimplifyDemandedBits(Value *V, APInt DemandedMask,
return false;
}
- KnownZero.clear();
+ KnownZero.clear();
KnownOne.clear();
if (!V->hasOneUse()) { // Other users may use these bits.
if (Depth != 0) { // Not at the root.
@@ -796,7 +796,7 @@ bool InstCombiner::SimplifyDemandedBits(Value *V, APInt DemandedMask,
// just set the DemandedMask to all bits.
DemandedMask = APInt::getAllOnesValue(BitWidth);
} else if (DemandedMask == 0) { // Not demanding any bits from V.
- if (V != UndefValue::get(VTy))
+ if (!isa<UndefValue>(V))
return UpdateValueUsesWith(V, UndefValue::get(VTy));
return false;
} else if (Depth == 6) { // Limit search depth.