Lines Matching refs:Mask

60 void llvm::ComputeMaskedBits(Value *V, const APInt &Mask,  in ComputeMaskedBits()  argument
65 unsigned BitWidth = Mask.getBitWidth(); in ComputeMaskedBits()
78 KnownOne = CI->getValue() & Mask; in ComputeMaskedBits()
79 KnownZero = ~KnownOne & Mask; in ComputeMaskedBits()
86 KnownZero = Mask; in ComputeMaskedBits()
95 ComputeMaskedBits(CV->getOperand(i), Mask, KnownZero2, KnownOne2, in ComputeMaskedBits()
116 KnownZero = Mask & APInt::getLowBitsSet(BitWidth, in ComputeMaskedBits()
129 ComputeMaskedBits(GA->getAliasee(), Mask, KnownZero, KnownOne, in ComputeMaskedBits()
139 KnownZero = Mask & APInt::getLowBitsSet(BitWidth, in ComputeMaskedBits()
147 if (Depth == MaxDepth || Mask == 0) in ComputeMaskedBits()
158 ComputeMaskedBits(I->getOperand(1), Mask, KnownZero, KnownOne, TD, Depth+1); in ComputeMaskedBits()
159 APInt Mask2(Mask & ~KnownZero); in ComputeMaskedBits()
172 ComputeMaskedBits(I->getOperand(1), Mask, KnownZero, KnownOne, TD, Depth+1); in ComputeMaskedBits()
173 APInt Mask2(Mask & ~KnownOne); in ComputeMaskedBits()
186 ComputeMaskedBits(I->getOperand(1), Mask, KnownZero, KnownOne, TD, Depth+1); in ComputeMaskedBits()
187 ComputeMaskedBits(I->getOperand(0), Mask, KnownZero2, KnownOne2, TD, in ComputeMaskedBits()
222 KnownZero &= Mask; in ComputeMaskedBits()
243 KnownZero = APInt::getHighBitsSet(BitWidth, LeadZ) & Mask; in ComputeMaskedBits()
247 ComputeMaskedBits(I->getOperand(2), Mask, KnownZero, KnownOne, TD, Depth+1); in ComputeMaskedBits()
248 ComputeMaskedBits(I->getOperand(1), Mask, KnownZero2, KnownOne2, TD, in ComputeMaskedBits()
281 APInt MaskIn = Mask.zextOrTrunc(SrcBitWidth); in ComputeMaskedBits()
299 ComputeMaskedBits(I->getOperand(0), Mask, KnownZero, KnownOne, TD, in ComputeMaskedBits()
309 APInt MaskIn = Mask.trunc(SrcBitWidth); in ComputeMaskedBits()
330 APInt Mask2(Mask.lshr(ShiftAmt)); in ComputeMaskedBits()
347 APInt Mask2(Mask.shl(ShiftAmt)); in ComputeMaskedBits()
365 APInt Mask2(Mask.shl(ShiftAmt)); in ComputeMaskedBits()
398 KnownZero = APInt::getHighBitsSet(BitWidth, NLZ2) & Mask; in ComputeMaskedBits()
411 BitWidth - Mask.countLeadingZeros()); in ComputeMaskedBits()
427 APInt Mask = APInt::getLowBitsSet(BitWidth, LHSKnownZeroOut); in ComputeMaskedBits() local
428 KnownZero |= KnownZero2 & Mask; in ComputeMaskedBits()
429 KnownOne |= KnownOne2 & Mask; in ComputeMaskedBits()
438 APInt Mask = APInt::getLowBitsSet(BitWidth, RHSKnownZeroOut); in ComputeMaskedBits() local
439 KnownZero |= LHSKnownZero & Mask; in ComputeMaskedBits()
440 KnownOne |= LHSKnownOne & Mask; in ComputeMaskedBits()
444 if (Mask.isNegative() && !KnownZero.isNegative() && !KnownOne.isNegative()){ in ComputeMaskedBits()
490 KnownZero &= Mask; in ComputeMaskedBits()
491 KnownOne &= Mask; in ComputeMaskedBits()
499 if (Mask.isNegative() && KnownZero.isNonNegative()) { in ComputeMaskedBits()
515 APInt Mask2 = LowBits & Mask; in ComputeMaskedBits()
516 KnownZero |= ~LowBits & Mask; in ComputeMaskedBits()
535 KnownZero = APInt::getHighBitsSet(BitWidth, Leaders) & Mask; in ComputeMaskedBits()
546 KnownZero = Mask & APInt::getLowBitsSet(BitWidth, in ComputeMaskedBits()
586 KnownZero = APInt::getLowBitsSet(BitWidth, TrailZ) & Mask; in ComputeMaskedBits()
630 KnownZero = Mask & in ComputeMaskedBits()
835 APInt Mask = APInt::getSignedMaxValue(BitWidth); in isKnownNonZero() local
838 ComputeMaskedBits(X, Mask, KnownZero, KnownOne, TD, Depth); in isKnownNonZero()
839 if ((KnownOne & Mask) != 0) in isKnownNonZero()
843 ComputeMaskedBits(Y, Mask, KnownZero, KnownOne, TD, Depth); in isKnownNonZero()
844 if ((KnownOne & Mask) != 0) in isKnownNonZero()
878 bool llvm::MaskedValueIsZero(Value *V, const APInt &Mask, in MaskedValueIsZero() argument
880 APInt KnownZero(Mask.getBitWidth(), 0), KnownOne(Mask.getBitWidth(), 0); in MaskedValueIsZero()
881 ComputeMaskedBits(V, Mask, KnownZero, KnownOne, TD, Depth); in MaskedValueIsZero()
883 return (KnownZero & Mask) == Mask; in MaskedValueIsZero()
974 APInt Mask = APInt::getAllOnesValue(TyBits); in ComputeNumSignBits() local
975 ComputeMaskedBits(U->getOperand(0), Mask, KnownZero, KnownOne, TD, in ComputeNumSignBits()
980 if ((KnownZero | APInt(TyBits, 1)) == Mask) in ComputeNumSignBits()
1001 APInt Mask = APInt::getAllOnesValue(TyBits); in ComputeNumSignBits() local
1002 ComputeMaskedBits(U->getOperand(1), Mask, KnownZero, KnownOne, in ComputeNumSignBits()
1006 if ((KnownZero | APInt(TyBits, 1)) == Mask) in ComputeNumSignBits()
1048 APInt Mask = APInt::getAllOnesValue(TyBits); in ComputeNumSignBits() local
1049 ComputeMaskedBits(V, Mask, KnownZero, KnownOne, TD, Depth); in ComputeNumSignBits()
1052 Mask = KnownZero; in ComputeNumSignBits()
1054 Mask = KnownOne; in ComputeNumSignBits()
1062 Mask = ~Mask; in ComputeNumSignBits()
1063 Mask <<= Mask.getBitWidth()-TyBits; in ComputeNumSignBits()
1066 return std::max(FirstAnswer, std::min(TyBits, Mask.countLeadingZeros())); in ComputeNumSignBits()