diff options
author | Owen Anderson <resistor@mac.com> | 2011-01-11 18:26:37 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-01-11 18:26:37 +0000 |
commit | a33b6254bb40488a9574533cadf4cd0b701e97d1 (patch) | |
tree | 1f0ca95cc3080d7cd20d3f5e38643c2ce36e12d0 /lib/Transforms/InstCombine/InstCombineCompares.cpp | |
parent | f73b99ab43c36b026a03430a30c329a343cdd77b (diff) | |
download | external_llvm-a33b6254bb40488a9574533cadf4cd0b701e97d1.zip external_llvm-a33b6254bb40488a9574533cadf4cd0b701e97d1.tar.gz external_llvm-a33b6254bb40488a9574533cadf4cd0b701e97d1.tar.bz2 |
Remove dead variable, const-ref-ize an APInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineCompares.cpp')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineCompares.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCompares.cpp b/lib/Transforms/InstCombine/InstCombineCompares.cpp index 985d912..bd33974 100644 --- a/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -1703,9 +1703,7 @@ static APInt DemandedBitsLHSMask(ICmpInst &I, ConstantInt *CI = dyn_cast<ConstantInt>(I.getOperand(1)); if (!CI) return APInt::getAllOnesValue(BitWidth); - - APInt RHS = CI->getValue(); - APInt Mask(BitWidth, 0); + const APInt &RHS = CI->getValue(); switch (I.getPredicate()) { // For a UGT comparison, we don't care about any bits that @@ -1730,7 +1728,6 @@ static APInt DemandedBitsLHSMask(ICmpInst &I, return APInt::getAllOnesValue(BitWidth); } - return Mask; } Instruction *InstCombiner::visitICmpInst(ICmpInst &I) { |