[llvm-commits] [llvm] r47380 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Dan Gohman
gohman at apple.com
Wed Feb 20 08:30:22 PST 2008
Author: djg
Date: Wed Feb 20 10:30:17 2008
New Revision: 47380
URL: http://llvm.org/viewvc/llvm-project?rev=47380&view=rev
Log:
Use APInt::intersects.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=47380&r1=47379&r2=47380&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Feb 20 10:30:17 2008
@@ -1283,9 +1283,9 @@
APInt SignBit = APInt::getSignBit(BitWidth);
SignBit = SignBit.lshr(ShAmt); // Adjust to where it is now in the mask.
- if (!!(KnownZero & SignBit)) {
+ if (KnownZero.intersects(SignBit)) {
KnownZero |= HighBits; // New bits are known zero.
- } else if (!!(KnownOne & SignBit)) {
+ } else if (KnownOne.intersects(SignBit)) {
KnownOne |= HighBits; // New bits are known one.
}
}
@@ -1313,10 +1313,10 @@
// If the sign bit of the input is known set or clear, then we know the
// top bits of the result.
- if (!!(KnownZero & InSignBit)) { // Input sign bit known clear
+ if (KnownZero.intersects(InSignBit)) { // Input sign bit known clear
KnownZero |= NewBits;
KnownOne &= ~NewBits;
- } else if (!!(KnownOne & InSignBit)) { // Input sign bit known set
+ } else if (KnownOne.intersects(InSignBit)) { // Input sign bit known set
KnownOne |= NewBits;
KnownZero &= ~NewBits;
} else { // Input sign bit unknown
More information about the llvm-commits
mailing list