diff options
author | Dan Gohman <gohman@apple.com> | 2008-03-13 22:13:53 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-03-13 22:13:53 +0000 |
commit | 002e5d0a170dadd5c307e0b00d8c7970835837e6 (patch) | |
tree | 326eae0ffb420bcc79c8b493fc353e67c30b3d65 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 8a97fddbc2c064e295ad5fb6269795bd904e1ed2 (diff) |
More APInt-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48344 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 03ca532787..3cd731073c 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1639,7 +1639,7 @@ unsigned SelectionDAG::ComputeNumSignBits(SDOperand Op, unsigned Depth) const{ // Handle NEG. if (ConstantSDNode *CLHS = dyn_cast<ConstantSDNode>(Op.getOperand(0))) - if (CLHS->getValue() == 0) { + if (CLHS->isNullValue()) { APInt KnownZero, KnownOne; APInt Mask = APInt::getAllOnesValue(VTBits); ComputeMaskedBits(Op.getOperand(1), Mask, KnownZero, KnownOne, Depth+1); @@ -1960,7 +1960,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, N1.getValueType() == VT && "Binary operator types must match!"); // (X & 0) -> 0. This commonly occurs when legalizing i64 values, so it's // worth handling here. - if (N2C && N2C->getValue() == 0) + if (N2C && N2C->isNullValue()) return N2; if (N2C && N2C->isAllOnesValue()) // X & -1 -> X return N1; @@ -1971,7 +1971,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, N1.getValueType() == VT && "Binary operator types must match!"); // (X ^| 0) -> X. This commonly occurs when legalizing i64 values, so it's // worth handling here. - if (N2C && N2C->getValue() == 0) + if (N2C && N2C->isNullValue()) return N1; break; case ISD::UDIV: |