reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

include/llvm/Support/KnownBits.h
   51     return Zero.countPopulation() + One.countPopulation() == getBitWidth();
   51     return Zero.countPopulation() + One.countPopulation() == getBitWidth();
  197     return One.countPopulation();
  202     return getBitWidth() - Zero.countPopulation();
lib/Analysis/ConstantFolding.cpp
 1969       return ConstantInt::get(Ty, Op->getValue().countPopulation());
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
14288     unsigned SliceSize = getUsedBits().countPopulation();
20074     if (ConstAndRHS && ConstAndRHS->getAPIntValue().countPopulation() == 1) {
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
 4330       return getConstant(Val.countPopulation(), DL, VT, C->isTargetOpcode(),
lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
 2240   int Width = BitWidth - APInt(BitWidth, NotKnownZero).countPopulation();
 2415     int Width = BitWidth - APInt(BitWidth, Mask0Imm).countPopulation();
lib/Target/AArch64/AArch64ISelLowering.cpp
 1026   if (Demanded.countPopulation() == Size)
lib/Target/ARM/ARMISelDAGToDAG.cpp
 2840   if (A.countPopulation() != (FirstOne - LastOne + 1))
lib/Target/ARM/ARMISelLowering.cpp
12445   FromMask = APInt::getLowBitsSet(ToMask.getBitWidth(), ToMask.countPopulation());
13998   if (OrCI.countPopulation() > Heuristic)
lib/Target/Mips/MipsSEISelDAGToDAG.cpp
  671       Imm = CurDAG->getTargetConstant(ImmValue.countPopulation() - 1, SDLoc(N),
  703       Imm = CurDAG->getTargetConstant(ImmValue.countPopulation() - 1, SDLoc(N),
lib/Target/X86/X86ISelLowering.cpp
 7837   assert((ZeroMask.countPopulation() + UndefMask.countPopulation() +
 7837   assert((ZeroMask.countPopulation() + UndefMask.countPopulation() +
 7838           LoadMask.countPopulation()) == NumElems &&
 7842   if (UndefMask.countPopulation() == NumElems)
 7846   if ((ZeroMask.countPopulation() + UndefMask.countPopulation()) == NumElems)
 7846   if ((ZeroMask.countPopulation() + UndefMask.countPopulation()) == NumElems)
35047       assert((IdentityOp == 0 || IdentityOp.countPopulation() == 1) &&
lib/Transforms/InstCombine/InstCombineCasts.cpp
  938         if (UnknownBit.countPopulation() == 1) {
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
 1013   unsigned NewNumElts = DemandedElts.countPopulation();
 1447         if (SubUndef.countPopulation() == Ratio)
lib/Transforms/Utils/Local.cpp
 2758       unsigned NumMaskedBits = AndMask.countPopulation();
lib/Transforms/Utils/SimplifyCFG.cpp
 4487       Bits - (Known.Zero | Known.One).countPopulation();
tools/clang/lib/AST/ExprConstant.cpp
10680     return Success(Val.countPopulation() % 2, E);
10690     return Success(Val.countPopulation(), E);
unittests/ADT/APIntTest.cpp
   51   EXPECT_EQ(128u, Minus1.countPopulation());
   61   EXPECT_EQ(32u, i33minus2.countPopulation());
   72   EXPECT_EQ(1u, i61.countPopulation());
   81   EXPECT_EQ(11u, i61.countPopulation());
   93   EXPECT_EQ(0u, i65.countPopulation());
  101   EXPECT_EQ(1u, i65minus.countPopulation());
  111   EXPECT_EQ(128u, u128max.countPopulation());
  119   EXPECT_EQ(64u, u64max.countPopulation());
  128   EXPECT_EQ(0u, zero.countPopulation());
  138   EXPECT_EQ(1u, one.countPopulation());
  148   EXPECT_EQ(1u, s128.countPopulation());
  159   EXPECT_EQ(1u, s128.countPopulation());
  170   EXPECT_EQ(30u, s128.countPopulation());
  180   EXPECT_EQ(96u, s128.countPopulation());
  193   EXPECT_EQ(4u, s256.countPopulation());
  204   EXPECT_EQ(8u, s256.countPopulation());
  213   EXPECT_EQ(200u, s256.countPopulation());
 2011   EXPECT_EQ(64u, i128lo64.countPopulation());
 2021   EXPECT_EQ(62u, i64hi1lo1.countPopulation());
 2029   EXPECT_EQ(125u, i127hi1lo1.countPopulation());
 2039   EXPECT_EQ(32u, i64hi32.countPopulation());
 2049   EXPECT_EQ(31u, i64hi31.countPopulation());
 2060   EXPECT_EQ(32u, i64lo32.countPopulation());
 2069   EXPECT_EQ(64u, i128lo64.countPopulation());
 2078   EXPECT_EQ(24u, i128lo24.countPopulation());
 2087   EXPECT_EQ(104u, i128lo104.countPopulation());
 2096   EXPECT_EQ(0u, i128lo0.countPopulation());
 2105   EXPECT_EQ(79u, i80lo79.countPopulation());
 2116   EXPECT_EQ(32u, i64hi32.countPopulation());
 2125   EXPECT_EQ(64u, i128hi64.countPopulation());
 2134   EXPECT_EQ(24u, i128hi24.countPopulation());
 2143   EXPECT_EQ(104u, i128hi104.countPopulation());
 2152   EXPECT_EQ(0u, i128hi0.countPopulation());
 2161   EXPECT_EQ(1u, i80hi1.countPopulation());
 2170   EXPECT_EQ(16u, i32hi16.countPopulation());
 2181   EXPECT_EQ(1u, i64from63.countPopulation());
 2192   EXPECT_EQ(32u, i32.countPopulation());
 2201   EXPECT_EQ(64u, i64.countPopulation());
 2210   EXPECT_EQ(96u, i96.countPopulation());
 2219   EXPECT_EQ(128u, i128.countPopulation());
 2248   EXPECT_EQ(32u, i64hi32.countPopulation());
 2257   EXPECT_EQ(64u, i128hi64.countPopulation());
 2266   EXPECT_EQ(24u, i128hi24.countPopulation());
 2275   EXPECT_EQ(104u, i128hi104.countPopulation());
 2284   EXPECT_EQ(0u, i128hi0.countPopulation());
 2293   EXPECT_EQ(1u, i80hi1.countPopulation());
 2302   EXPECT_EQ(16u, i32hi16.countPopulation());
 2354   EXPECT_EQ(2U, i256.countPopulation());
 2359   EXPECT_EQ(2U, i256.countPopulation());
 2364   EXPECT_EQ(2U, i256.countPopulation());
 2369   EXPECT_EQ(2U, i256.countPopulation());
 2374   EXPECT_EQ(1U, i256.countPopulation());
 2386   EXPECT_EQ(47U, i72.countPopulation());
 2392   EXPECT_EQ(65U, i72.countPopulation());
 2398   EXPECT_EQ(65U, i128.countPopulation());
 2423   EXPECT_EQ(2U, i256.countPopulation());
 2428   EXPECT_EQ(2U, i256.countPopulation());
 2433   EXPECT_EQ(2U, i256.countPopulation());
 2438   EXPECT_EQ(2U, i256.countPopulation());
 2443   EXPECT_EQ(1U, i256.countPopulation());
 2486   EXPECT_EQ(31U, i32_max.countPopulation());
 2491   EXPECT_EQ(32U, i32_min.countPopulation());
 2496   EXPECT_EQ(63U, i32_neg1.countPopulation());
 2514   EXPECT_EQ(32U, i96.countPopulation());
utils/TableGen/CodeGenSchedule.cpp
  375                  unsigned LhsCountPopulation = Lhs.countPopulation();
  376                  unsigned RhsCountPopulation = Rhs.countPopulation();