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

References

include/llvm/ADT/APSInt.h
  256     return APSInt(static_cast<const APInt&>(*this) & RHS, IsUnsigned);
lib/Analysis/ScalarEvolution.cpp
 6269         if ((LZ != 0 || TZ != 0) && !((~A & ~Known.Zero) & EffectiveMask)) {
lib/Analysis/ValueTracking.cpp
  459     Known.One &= Range.getUnsignedMax() & Mask;
  460     Known.Zero &= ~Range.getUnsignedMax() & Mask;
  655         Known.Zero |= RHSKnown.Zero & MaskKnown.One;
  656         Known.One  |= RHSKnown.One  & MaskKnown.One;
  668         Known.Zero |= RHSKnown.One  & MaskKnown.One;
  669         Known.One  |= RHSKnown.Zero & MaskKnown.One;
  681         Known.Zero |= RHSKnown.Zero & BKnown.Zero;
  682         Known.One  |= RHSKnown.One  & BKnown.Zero;
  694         Known.Zero |= RHSKnown.One  & BKnown.Zero;
  695         Known.One  |= RHSKnown.Zero & BKnown.Zero;
  708         Known.Zero |= RHSKnown.Zero & BKnown.Zero;
  709         Known.One  |= RHSKnown.One  & BKnown.Zero;
  710         Known.Zero |= RHSKnown.One  & BKnown.One;
  711         Known.One  |= RHSKnown.Zero & BKnown.One;
  724         Known.Zero |= RHSKnown.One  & BKnown.Zero;
  725         Known.One  |= RHSKnown.Zero & BKnown.Zero;
  726         Known.Zero |= RHSKnown.Zero & BKnown.One;
  727         Known.One  |= RHSKnown.One  & BKnown.One;
 1029     APInt KnownZeroOut = (Known.Zero & Known2.Zero) | (Known.One & Known2.One);
 1029     APInt KnownZeroOut = (Known.Zero & Known2.Zero) | (Known.One & Known2.One);
 1031     Known.One = (Known.Zero & Known2.One) | (Known.One & Known2.Zero);
 1031     Known.One = (Known.Zero & Known2.One) | (Known.One & Known2.Zero);
 1241         Known.Zero = Known2.Zero & LowBits;
 1242         Known.One = Known2.One & LowBits;
 1254         assert((Known.Zero & Known.One) == 0 && "Bits known to be one AND zero?");
 1735   assert((Known.Zero & Known.One) == 0 && "Bits known to be one AND zero?");
 1815       if ((~(LHSBits.Zero & RHSBits.Zero)).isPowerOf2())
lib/CodeGen/GlobalISel/GISelKnownBits.cpp
  176     APInt KnownZeroOut = (Known.Zero & Known2.Zero) | (Known.One & Known2.One);
  176     APInt KnownZeroOut = (Known.Zero & Known2.Zero) | (Known.One & Known2.One);
  178     Known.One = (Known.Zero & Known2.One) | (Known.One & Known2.Zero);
  178     Known.One = (Known.Zero & Known2.One) | (Known.One & Known2.Zero);
lib/CodeGen/GlobalISel/RegisterBankInfo.cpp
  565     assert((ValueMask & PartMapMask) == PartMapMask &&
lib/CodeGen/GlobalISel/Utils.cpp
  353       return C1 & C2;
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
 4784           (Mask->getAPIntValue() & C->getAPIntValue()) != C->getAPIntValue())
14656     if ((CurrentUsedBits & UsedBits) != 0)
14917     if ((Imm & Mask) == Imm) {
14918       APInt NewImm = (Imm & Mask).lshr(ShAmt).trunc(NewBW);
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
 1928   if (((Known.Zero|Known.One) & HighBitMask) == 0)
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
 2149     APInt NewVal = CVal & DemandedBits;
 2351       SplatIdx = (UndefElts & DemandedElts).countTrailingOnes();
 2711     APInt KnownZeroOut = (Known.Zero & Known2.Zero) | (Known.One & Known2.One);
 2711     APInt KnownZeroOut = (Known.Zero & Known2.Zero) | (Known.One & Known2.One);
 2713     Known.One = (Known.Zero & Known2.One) | (Known.One & Known2.Zero);
 2713     Known.One = (Known.Zero & Known2.One) | (Known.One & Known2.Zero);
 3097         Known.Zero = Known2.Zero & LowBits;
 3098         Known.One = Known2.One & LowBits;
 3109         assert((Known.Zero & Known.One) == 0&&"Bits known to be one AND zero?");
 3122         Known.One = Known2.One & LowBits;
 4700   case ISD::AND:  return std::make_pair(C1 & C2, true);
 9417     SplatUndef = HighUndef & LowUndef;
lib/CodeGen/SelectionDAG/TargetLowering.cpp
  495       SDValue NewC = TLO.DAG.getConstant(Demanded & C, DL, VT);
 1019       if ((LHSKnown.Zero & DemandedBits) ==
 1020           (~RHSC->getAPIntValue() & DemandedBits))
 1025       if (ShrinkDemandedConstant(Op, ~LHSKnown.Zero & DemandedBits, TLO))
 1044     if (SimplifyDemandedBits(Op0, ~Known.Zero & DemandedBits, DemandedElts,
 1073     if (ShrinkDemandedConstant(Op, ~Known2.Zero & DemandedBits, TLO))
 1093     if (SimplifyDemandedBits(Op0, ~Known.One & DemandedBits, DemandedElts,
 1175     KnownOut.Zero = (Known.Zero & Known2.Zero) | (Known.One & Known2.One);
 1175     KnownOut.Zero = (Known.Zero & Known2.Zero) | (Known.One & Known2.One);
 1177     KnownOut.One = (Known.Zero & Known2.One) | (Known.One & Known2.Zero);
 1177     KnownOut.One = (Known.Zero & Known2.One) | (Known.One & Known2.Zero);
 1187             TLO.DAG.getConstant(~C->getAPIntValue() & DemandedBits, dl, VT);
 1771         if (!(HighBits & DemandedBits)) {
 2369     KnownUndef = UndefLHS & UndefRHS;
 2370     KnownZero = ZeroLHS & ZeroRHS;
 2495     KnownZero = ZeroLHS & ZeroRHS;
 2514     KnownUndef = UndefLHS & UndefRHS; // TODO: use getKnownUndefForVectorBinop?
 2565   assert((KnownUndef & KnownZero) == 0 && "Elements flagged as undef AND zero");
 3650           if ((-AndRHSC).isPowerOf2() && (AndRHSC & C1) == C1) {
lib/ExecutionEngine/ExecutionEngine.cpp
  806           case Instruction::And: GV.IntVal = LHS.IntVal & RHS.IntVal; break;
lib/ExecutionEngine/Interpreter/Execution.cpp
  793     case Instruction::And:   INTEGER_VECTOR_OPERATION(&) break;
  835     case Instruction::And:   R.IntVal = Src1.IntVal & Src2.IntVal; break;
 2085   case Instruction::And:  Dest.IntVal = Op0.IntVal & Op1.IntVal; break;
lib/IR/ConstantFold.cpp
 1139           if ((PossiblySetBits & CI2->getValue()) == PossiblySetBits)
 1178             if ((CI2->getValue() & BitsNotSet) == CI2->getValue())
 1249         return ConstantInt::get(CI1->getContext(), C1V & C2V);
lib/Support/KnownBits.cpp
   35   APInt Known = std::move(LHSKnownUnion) & RHSKnownUnion & CarryKnownUnion;
   35   APInt Known = std::move(LHSKnownUnion) & RHSKnownUnion & CarryKnownUnion;
   37   assert((PossibleSumZero & Known) == (PossibleSumOne & Known) &&
   37   assert((PossibleSumZero & Known) == (PossibleSumOne & Known) &&
   42   KnownOut.Zero = ~std::move(PossibleSumZero) & Known;
   43   KnownOut.One = std::move(PossibleSumOne) & Known;
lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
 1878   return (SignificantDstMask & SignificantBitsToBeInserted) == 0 &&
 1999       Mask = ResultUsefulBits & OpUsefulBits;
 2017       Mask = ResultUsefulBits & OpUsefulBits;
lib/Target/ARM/ARMISelLowering.cpp
11711   if ((C1Int & Mask) != C1Int)
12492     if ((NewToMask & CombinedToMask).getBoolValue())
14004   if ((OrCI & Known.Zero) != OrCI)
lib/Target/Hexagon/HexagonConstPropagation.cpp
 1424   Result = A1 & A2;
 1584   Result = A1.zextOrTrunc(Width) & Mask;
lib/Target/SystemZ/SystemZISelLowering.cpp
 6292   Known.Zero = LHSKnown.Zero & RHSKnown.Zero;
 6293   Known.One = LHSKnown.One & RHSKnown.One;
lib/Target/X86/X86ISelLowering.cpp
31447   APInt ShrunkMask = Mask & Demanded;
34486     KnownZero = LHSZero & RHSZero;
34487     KnownUndef = LHSUndef & RHSUndef;
34922       Known.One = KnownVec.One & KnownScl.One;
34923       Known.Zero = KnownVec.Zero & KnownScl.Zero;
lib/Target/XCore/XCoreISelLowering.cpp
 1660       if ((Known.Zero & Mask) == Mask) {
 1682       if ((Known.Zero & Mask) == Mask) {
 1697       if ((Known.Zero & Mask) == Mask) {
lib/Transforms/InstCombine/InstCombineAddSub.cpp
 1328         CRHS->getValue() == (CRHS->getValue() & C2->getValue())) {
 1337       APInt AddRHSHighBitsAnd(AddRHSHighBits & C2->getValue());
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  145           if ((AddRHS & AndRHSV).isNullValue()) { // Bit is not set, noop
  487   if ((BCst->getValue() & DCst->getValue()) == 0)
  506   if ((((BCst->getValue() & DCst->getValue()) & ECst->getValue()) == 0) &&
  506   if ((((BCst->getValue() & DCst->getValue()) & ECst->getValue()) == 0) &&
  518     return (C1->getValue() & C2->getValue()) == C1->getValue();
  521     return (C1->getValue() & C2->getValue()) == C2->getValue();
  559   if ((BCst->getValue() & ECst->getValue()) != 0)
  690     APInt NewMask = BCst->getValue() & DCst->getValue();
  735     if (((BCst->getValue() & DCst->getValue()) &
 1242       if ((Low & AndC->getValue()).isNullValue() &&
 1243           (Low & BigC->getValue()).isNullValue()) {
 1765       Constant *NewC = ConstantInt::get(I.getType(), *C & *XorC);
 1779       APInt Together = *C & *OrC;
 2503       if ((C1->getValue() & C2->getValue()).isNullValue()) {
lib/Transforms/InstCombine/InstCombineCompares.cpp
 2549   if (Pred == ICmpInst::ICMP_UGT && (C + 1).isPowerOf2() && (*C2 & C) == C)
 2615   if (Pred == ICmpInst::ICMP_UGT && (C + 1).isPowerOf2() && (*C2 & C) == 0)
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
   55   I->setOperand(OpNo, ConstantInt::get(Op->getType(), *C & Demanded));
  177     APInt IKnownOne = RHSKnown.One & LHSKnown.One;
  209     APInt IKnownZero = RHSKnown.Zero & LHSKnown.Zero;
  241     APInt IKnownZero = (RHSKnown.Zero & LHSKnown.Zero) |
  242                        (RHSKnown.One & LHSKnown.One);
  244     APInt IKnownOne =  (RHSKnown.Zero & LHSKnown.One) |
  245                        (RHSKnown.One & LHSKnown.Zero);
  276                                                  ~RHSKnown.One & DemandedMask);
  294           (LHSKnown.One & RHSKnown.One & DemandedMask) != 0) {
  294           (LHSKnown.One & RHSKnown.One & DemandedMask) != 0) {
  297         APInt NewMask = ~(LHSKnown.One & RHSKnown.One & DemandedMask);
  297         APInt NewMask = ~(LHSKnown.One & RHSKnown.One & DemandedMask);
  300           ConstantInt::get(I->getType(), NewMask & AndRHS->getValue());
  305           ConstantInt::get(I->getType(), NewMask & XorRHS->getValue());
  356     Known.One = RHSKnown.One & LHSKnown.One;
  357     Known.Zero = RHSKnown.Zero & LHSKnown.Zero;
  617         Known.Zero = LHSKnown.Zero & LowBits;
  618         Known.One = LHSKnown.One & LowBits;
  652     Known.Zero = APInt::getHighBitsSet(BitWidth, Leaders) & DemandedMask;
  787     APInt IKnownOne = RHSKnown.One & LHSKnown.One;
  816     APInt IKnownZero = RHSKnown.Zero & LHSKnown.Zero;
  846     APInt IKnownZero = (RHSKnown.Zero & LHSKnown.Zero) |
  847                        (RHSKnown.One & LHSKnown.One);
  849     APInt IKnownOne =  (RHSKnown.Zero & LHSKnown.One) |
  850                        (RHSKnown.One & LHSKnown.Zero);
  939   if ((BitMask1 & DemandedMask) == (BitMask2 & DemandedMask)) {
  939   if ((BitMask1 & DemandedMask) == (BitMask2 & DemandedMask)) {
 1392     UndefElts = UndefElts2 & UndefElts3;
 1485       UndefElts = UndefElts2 & UndefElts3;
lib/Transforms/Scalar/GuardWidening.cpp
  674       if ((OpRHS->getValue() & Known.Zero) == OpRHS->getValue()) {
lib/Transforms/Utils/Local.cpp
 2770         if ((AndMask & Bit) == 0)
tools/clang/lib/Analysis/CFG.cpp
  991       if ((BitOp->getOpcode() == BO_And && (L2 & L1) != L1) ||
tools/clang/lib/Basic/FixedPoint.cpp
   37   llvm::APInt Masked(NewVal & Mask);
  199     FractPart = (FractPart * RadixInt) & FractPartMask;
tools/clang/lib/CodeGen/CGExprConstant.cpp
  259         assert((!(CI->getValue() & UpdateMask) || AllowOverwrite) &&
tools/clang/lib/Sema/SemaDecl.cpp
17344   return !(FlagMask & Val) || (AllowMask && !(FlagMask & ~Val));
tools/lldb/source/Utility/Scalar.cpp
 2270       result.m_integer = a->m_integer & b->m_integer;
 2691         llvm::APInt bitwize_and = m_integer & sign_bit;
unittests/ADT/APIntTest.cpp
  256   EXPECT_EQ(zero, zero & zero);
  257   EXPECT_EQ(zero, one & zero);
  258   EXPECT_EQ(zero, zero & one);
  259   EXPECT_EQ(one, one & one);
  260   EXPECT_EQ(zero, zero & zero);
  261   EXPECT_EQ(zero, neg_one & zero);
  262   EXPECT_EQ(zero, zero & neg_one);
  263   EXPECT_EQ(neg_one, neg_one & neg_one);
  783     APInt AndLL = Ten & Twelve;
  790     APInt AndRL = getRValue("A", RawDataL) & Twelve;
unittests/IR/ConstantRangeTest.cpp
 2115         if ((Num & Known.Zero) != 0 || (~Num & Known.One) != 0)
 2115         if ((Num & Known.Zero) != 0 || (~Num & Known.One) != 0)
unittests/Support/KnownBitsTest.cpp
   42     if ((Num & Known.Zero) != 0 || (~Num & Known.One) != 0)
   42     if ((Num & Known.Zero) != 0 || (~Num & Known.One) != 0)