summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-02-20 16:30:17 +0000
committerDan Gohman <gohman@apple.com>2008-02-20 16:30:17 +0000
commitb717fdaa7ba9001ee16c456cd1fbcccb4f27e4a7 (patch)
tree59a616766c8511b3d9f59382ac4545061da009ce /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent4edaff3586bd92318b354f00dc8ef898b80aec89 (diff)
downloadbcm5719-llvm-b717fdaa7ba9001ee16c456cd1fbcccb4f27e4a7.tar.gz
bcm5719-llvm-b717fdaa7ba9001ee16c456cd1fbcccb4f27e4a7.zip
Use APInt::intersects.
llvm-svn: 47380
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 8a2962f0c33..ef28aa5a2b4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1283,9 +1283,9 @@ void SelectionDAG::ComputeMaskedBits(SDOperand Op, const APInt &Mask,
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 @@ void SelectionDAG::ComputeMaskedBits(SDOperand Op, const APInt &Mask,
// 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
OpenPOWER on IntegriCloud