Lines Matching refs:And
28 /// constant and return true.
70 /// true if it made any change and false otherwise.
86 /// downstream. Consequently, depending on the mask and V, it may be possible
88 /// function does the replacement and returns true. In all other cases, it
89 /// returns false after analyzing the expression and setting KnownOne and known
93 /// the expression. KnownOne and KnownZero always follow the invariant that
94 /// KnownOne & KnownZero == 0. That is, a bit can't be both 1 and 0. Note that
95 /// the bits in KnownOne and KnownZero may only be accurate for those bits set
97 /// and KnownOne must all be the same.
99 /// This returns null if it did not change anything and it permits no
116 "Value *V, DemandedMask, KnownZero and KnownOne "
151 // If there are multiple uses of this value and we aren't at the root, then
156 // context, we can at least compute the knownzero/knownone bits, and we can
159 if (I->getOpcode() == Instruction::And) {
167 // These bits cannot contribute to the result of the 'and' in this
241 case Instruction::And:
248 assert(!(RHSKnownZero & RHSKnownOne) && "Bits known to be one AND zero?");
249 assert(!(LHSKnownZero & LHSKnownOne) && "Bits known to be one AND zero?");
258 // These bits cannot contribute to the result of the 'and'.
286 assert(!(RHSKnownZero & RHSKnownOne) && "Bits known to be one AND zero?");
287 assert(!(LHSKnownZero & LHSKnownOne) && "Bits known to be one AND zero?");
328 assert(!(RHSKnownZero & RHSKnownOne) && "Bits known to be one AND zero?");
329 assert(!(LHSKnownZero & LHSKnownOne) && "Bits known to be one AND zero?");
360 // If all of the demanded bits on one side are known, and all of the set
362 // into an AND, as we know the bits will be cleared.
369 Instruction *And = BinaryOperator::CreateAnd(I->getOperand(0), AndC);
370 return InsertNewInstWith(And, *I);
379 // If our LHS is an 'and' and if it has one use, and if any of the bits we
381 // bits to zero. We can just knock out bits from the 'and' and the 'xor',
384 if (LHSInst->getOpcode() == Instruction::And && LHSInst->hasOneUse() &&
421 assert(!(RHSKnownZero & RHSKnownOne) && "Bits known to be one AND zero?");
422 assert(!(LHSKnownZero & LHSKnownOne) && "Bits known to be one AND zero?");
429 // Only known if known in both the LHS and RHS.
444 assert(!(KnownZero & KnownOne) && "Bits known to be one AND zero?");
467 assert(!(KnownZero & KnownOne) && "Bits known to be one AND zero?");
482 assert(!(KnownZero & KnownOne) && "Bits known to be one AND zero?");
509 assert(!(KnownZero & KnownOne) && "Bits known to be one AND zero?");
532 // significant bit and all those below it.
539 // Disable the nsw and nuw flags here: We can no longer guarantee that
550 // the known zeros and ones.
580 assert(!(KnownZero & KnownOne) && "Bits known to be one AND zero?");
596 // If the shift is exact, then it does demand the low bits (and knows that
604 assert(!(KnownZero & KnownOne) && "Bits known to be one AND zero?");
615 // If this is an arithmetic shift right and only the low-bit is set, we can
641 // If the shift is exact, then it does demand the low bits (and knows that
649 assert(!(KnownZero & KnownOne) && "Bits known to be one AND zero?");
700 // If LHS is negative and not all low bits are zero, then the upper bits
705 assert(!(KnownZero & KnownOne) && "Bits known to be one AND zero?");
788 /// "E1 = (X lsr C1) << C2", where the C1 and C2 are constant, into
792 /// Suppose E1 and E2 are generally different in bits S={bm, bm+1,
797 /// 3) Combination of 1) and 2). Some bits in S are 0, and we don't care the
871 /// operand are undef and returns that information in UndefElts.
1151 case Instruction::And:
1199 // If only the low elt is demanded and this is a scalarizable intrinsic,