diff options
author | Dan Gohman <gohman@apple.com> | 2008-02-20 16:30:17 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-02-20 16:30:17 +0000 |
commit | ca93a43e8409c6dc5ccf2c9762fb513f9d318372 (patch) | |
tree | d6fac9d3961bc6cbd70ba16fe3d6230bb5919356 | |
parent | bd999178929c10bdeb0a2577fa02981778edaee7 (diff) | |
download | external_llvm-ca93a43e8409c6dc5ccf2c9762fb513f9d318372.zip external_llvm-ca93a43e8409c6dc5ccf2c9762fb513f9d318372.tar.gz external_llvm-ca93a43e8409c6dc5ccf2c9762fb513f9d318372.tar.bz2 |
Use APInt::intersects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47380 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 8a2962f..ef28aa5 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/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 |