Use clear() to zero an existing APInt.
authorDan Gohman <gohman@apple.com>
Sat, 21 Jun 2008 22:02:15 +0000 (22:02 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 21 Jun 2008 22:02:15 +0000 (22:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52601 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index bca5e756d457a3a267752336cd0b36f42fafab3c..abd72727e9c906b339be9e1fae9d16b982dcf217 100644 (file)
@@ -1406,7 +1406,7 @@ void SelectionDAG::ComputeMaskedBits(SDOperand Op, const APInt &Mask,
   case ISD::CTPOP: {
     unsigned LowBits = Log2_32(BitWidth)+1;
     KnownZero = APInt::getHighBitsSet(BitWidth, BitWidth - LowBits);
-    KnownOne  = APInt(BitWidth, 0);
+    KnownOne.clear();
     return;
   }
   case ISD::LOAD: {