[llvm-commits] [llvm] r152070 - /llvm/trunk/lib/Analysis/ValueTracking.cpp
Eli Friedman
eli.friedman at gmail.com
Mon Mar 5 15:22:40 PST 2012
Author: efriedma
Date: Mon Mar 5 17:22:40 2012
New Revision: 152070
URL: http://llvm.org/viewvc/llvm-project?rev=152070&view=rev
Log:
A few more cases of missing masking in ComputeMaskedBits; found by inspection.
Modified:
llvm/trunk/lib/Analysis/ValueTracking.cpp
Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=152070&r1=152069&r2=152070&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Mon Mar 5 17:22:40 2012
@@ -723,17 +723,17 @@
// If this call is undefined for 0, the result will be less than 2^n.
if (II->getArgOperand(1) == ConstantInt::getTrue(II->getContext()))
LowBits -= 1;
- KnownZero = APInt::getHighBitsSet(BitWidth, BitWidth - LowBits);
+ KnownZero = Mask & APInt::getHighBitsSet(BitWidth, BitWidth - LowBits);
break;
}
case Intrinsic::ctpop: {
unsigned LowBits = Log2_32(BitWidth)+1;
- KnownZero = APInt::getHighBitsSet(BitWidth, BitWidth - LowBits);
+ KnownZero = Mask & APInt::getHighBitsSet(BitWidth, BitWidth - LowBits);
break;
}
case Intrinsic::x86_sse42_crc32_64_8:
case Intrinsic::x86_sse42_crc32_64_64:
- KnownZero = APInt::getHighBitsSet(64, 32);
+ KnownZero = Mask & APInt::getHighBitsSet(64, 32);
break;
}
}
More information about the llvm-commits
mailing list