Lines Matching refs:Zero

23   APInt Zero;
28 KnownBits(APInt Zero, APInt One)
29 : Zero(std::move(Zero)), One(std::move(One)) {}
32 // Default construct Zero and One.
36 KnownBits(unsigned BitWidth) : Zero(BitWidth, 0), One(BitWidth, 0) {}
40 assert(Zero.getBitWidth() == One.getBitWidth() &&
41 "Zero and One should have the same width!");
42 return Zero.getBitWidth();
46 bool hasConflict() const { return Zero.intersects(One); }
51 return Zero.countPopulation() + One.countPopulation() == getBitWidth();
62 bool isUnknown() const { return Zero.isNullValue() && One.isNullValue(); }
66 Zero.clearAllBits();
73 return Zero.isAllOnesValue();
84 Zero.setAllBits();
90 Zero.clearAllBits();
98 bool isNonNegative() const { return Zero.isSignBitSet(); }
101 bool isStrictlyPositive() const { return Zero.isSignBitSet() && !One.isNullValue(); }
110 Zero.setSignBit();
122 return ~Zero;
125 /// Truncate the underlying known Zero and One bits. This is equivalent
128 return KnownBits(Zero.trunc(BitWidth), One.trunc(BitWidth));
131 /// Extends the underlying known Zero and One bits.
137 APInt NewZero = Zero.zext(BitWidth);
143 /// Sign extends the underlying known Zero and One bits. This is equivalent
146 return KnownBits(Zero.sext(BitWidth), One.sext(BitWidth));
149 /// Extends or truncates the underlying known Zero and One bits. When
157 return KnownBits(Zero.zextOrTrunc(BitWidth), One.zextOrTrunc(BitWidth));
162 return Zero.countTrailingOnes();
172 return Zero.countLeadingOnes();
197 return Zero.countTrailingZeros();
207 return Zero.countLeadingZeros();
217 return getBitWidth() - Zero.countPopulation();