[llvm-commits] [llvm] r123248 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
Owen Anderson
resistor at mac.com
Tue Jan 11 10:26:37 PST 2011
Author: resistor
Date: Tue Jan 11 12:26:37 2011
New Revision: 123248
URL: http://llvm.org/viewvc/llvm-project?rev=123248&view=rev
Log:
Remove dead variable, const-ref-ize an APInt.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=123248&r1=123247&r2=123248&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Tue Jan 11 12:26:37 2011
@@ -1703,9 +1703,7 @@
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 @@
return APInt::getAllOnesValue(BitWidth);
}
- return Mask;
}
Instruction *InstCombiner::visitICmpInst(ICmpInst &I) {
More information about the llvm-commits
mailing list