summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-01-11 18:26:37 +0000
committerOwen Anderson <resistor@mac.com>2011-01-11 18:26:37 +0000
commit0022a4b417604f7c2aa3b686390271e4793b74cf (patch)
tree600f9ecb64534c588d8aaff901ffaca634784f34 /llvm/lib/Transforms
parentd41db8f9cb9bc85d60ea4ce4e2abcef010238a6a (diff)
downloadbcm5719-llvm-0022a4b417604f7c2aa3b686390271e4793b74cf.tar.gz
bcm5719-llvm-0022a4b417604f7c2aa3b686390271e4793b74cf.zip
Remove dead variable, const-ref-ize an APInt.
llvm-svn: 123248
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 985d9129b3e..bd339742ef2 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud