Lines Matching full:zero

28   APInt CarryKnownZero = ~(PossibleSumZero ^ LHS.Zero ^ RHS.Zero);  in computeForAddCarry()
32 APInt LHSKnownUnion = LHS.Zero | LHS.One; in computeForAddCarry()
33 APInt RHSKnownUnion = RHS.Zero | RHS.One; in computeForAddCarry()
39 KnownOut.Zero = ~std::move(PossibleSumZero) & Known; in computeForAddCarry()
48 LHS, RHS, Carry.Zero.getBoolValue(), Carry.One.getBoolValue()); in computeForAddCarry()
69 std::swap(NotRHS.Zero, NotRHS.One); in computeForAddSub()
98 KnownOut.Zero.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub()
100 KnownOut.Zero.setHighBits(MaxVal.countl_zero()); in computeForAddSub()
121 KnownOut.Zero.setSignBit(); in computeForAddSub()
126 KnownOut.Zero.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub()
143 std::swap(RHS.Zero, RHS.One); in computeForSubBorrow()
146 /*CarryOne=*/Borrow.Zero.getBoolValue()); in computeForSubBorrow()
160 Result.Zero = Zero << ExtBits; in sextInReg()
162 Result.Zero.ashrInPlace(ExtBits); in sextInReg()
169 unsigned N = (Zero | Val).countl_one(); in makeGE()
175 return KnownBits(Zero, One | MaskedVal); in makeGE()
198 auto Flip = [](const KnownBits &Val) { return KnownBits(Val.One, Val.Zero); }; in umin()
206 APInt Zero = Val.Zero; in smax() local
208 Zero.setBitVal(SignBitPosition, Val.One[SignBitPosition]); in smax()
209 One.setBitVal(SignBitPosition, Val.Zero[SignBitPosition]); in smax()
210 return KnownBits(Zero, One); in smax()
219 APInt Zero = Val.One; in smin() local
220 APInt One = Val.Zero; in smin()
221 Zero.setBitVal(SignBitPosition, Val.Zero[SignBitPosition]); in smin()
223 return KnownBits(Zero, One); in smin()
265 bool Tmp = Arg->Zero[SignBitPosition]; in abds()
266 Arg->Zero.setBitVal(SignBitPosition, Arg->One[SignBitPosition]); in abds()
291 Known.Zero = LHS.Zero.ushl_ov(ShiftAmt, ShiftedOutZero); in shl()
292 Known.Zero.setLowBits(ShiftAmt); in shl()
298 // NUW means we can assume anything shifted out was a zero. in shl()
315 Known.Zero.setLowBits(MinShiftAmount); in shl()
336 Known.Zero.setLowBits(LHS.countMinTrailingZeros()); in shl()
349 unsigned ShiftAmtZeroMask = RHS.Zero.zextOrTrunc(32).getZExtValue(); in shl()
351 Known.Zero.setAllBits(); in shl()
375 Known.Zero.lshrInPlace(ShiftAmt); in lshr()
377 // High bits are known zero. in lshr()
378 Known.Zero.setHighBits(ShiftAmt); in lshr()
388 Known.Zero.setHighBits(MinShiftAmount); in lshr()
400 // Always poison. Return zero because we don't like returning conflict. in lshr()
407 unsigned ShiftAmtZeroMask = RHS.Zero.zextOrTrunc(32).getZExtValue(); in lshr()
409 Known.Zero.setAllBits(); in lshr()
433 Known.Zero.ashrInPlace(ShiftAmt); in ashr()
445 // Always poison. Return zero because we don't like returning conflict. in ashr()
460 // Always poison. Return zero because we don't like returning conflict. in ashr()
467 unsigned ShiftAmtZeroMask = RHS.Zero.zextOrTrunc(32).getZExtValue(); in ashr()
469 Known.Zero.setAllBits(); in ashr()
491 if (LHS.One.intersects(RHS.Zero) || RHS.One.intersects(LHS.Zero)) in eq()
551 // If the source's MSB is zero then we know the rest of the bits already. in abs()
555 // Absolute value preserves trailing zero count. in abs()
562 // all the rest of the bits except one to be zero. Since we have in abs()
565 if (IntMinIsPoison && (Zero.popcount() + 2) == getBitWidth()) in abs()
574 // zero. So if we know high zero bits, but have unknown low bits, we know in abs()
575 // for certain those high-zero bits will end up as one. This is because, in abs()
582 Tmp.Zero.setSignBit(); in abs()
591 KnownAbs.Zero.setLowBits(MinTZ); in abs()
596 // We only know that the absolute values's MSB will be zero if INT_MIN is in abs()
601 KnownAbs.Zero.setSignBit(); in abs()
617 return K.Zero[BitWidth - 1] || K.One[BitWidth - 1]; in computeForSatAddSub()
664 Res.Zero.setSignBit(); in computeForSatAddSub()
669 Res.Zero.clearSignBit(); in computeForSatAddSub()
675 Res.Zero.clearSignBit(); in computeForSatAddSub()
679 Res.Zero.setSignBit(); in computeForSatAddSub()
694 // We select between the operation result and all-ones/zero in computeForSatAddSub()
699 Res.Zero &= ~Mask; in computeForSatAddSub()
701 Res.Zero |= Mask; in computeForSatAddSub()
730 Res.Zero = ~C; in computeForSatAddSub()
738 Res.Zero.clearLowBits(BitWidth - 1); in computeForSatAddSub()
743 Res.Zero.clearAllBits(); in computeForSatAddSub()
746 // We need to clear all the known ones as we can only use the leading zero. in computeForSatAddSub()
807 // computes one more leading zero. in mul()
829 // We know the bottom 3 bits are zero since the first can be divided by in mul()
865 unsigned TrailBitsKnown0 = (LHS.Zero | LHS.One).countr_one(); in mul()
866 unsigned TrailBitsKnown1 = (RHS.Zero | RHS.One).countr_one(); in mul()
880 Res.Zero.setHighBits(LeadZ); in mul()
881 Res.Zero |= (~BottomKnown).getLoBits(ResultBitsKnown); in mul()
884 // If we're self-multiplying then bit[1] is guaranteed to be zero. in mul()
888 Res.Zero.setBit(1); in mul()
928 Known.Zero.setLowBits(MinTZ); in divComputeLowBit()
956 // Result is either known Zero or UB. Return Zero either way. in sdiv()
991 Known.Zero.setHighBits(LeadZ); in sdiv()
1008 // Result is either known Zero or UB. Return Zero either way. in udiv()
1014 // We can figure out the minimum number of upper zero bits by doing in udiv()
1016 // gets larger, the number of upper zero bits increases. in udiv()
1023 Known.Zero.setHighBits(LeadZ); in udiv()
1031 if (!RHS.isZero() && RHS.Zero[0]) { in remGetLowBits()
1032 // rem X, Y where Y[0:N] is zero will preserve X[0:N] in the result. in remGetLowBits()
1036 APInt ZerosMask = LHS.Zero & Mask; in remGetLowBits()
1047 Known.Zero |= HighBits; in urem()
1052 // zero bits in either operand must also exist in the result. in urem()
1055 Known.Zero.setHighBits(Leaders); in urem()
1064 // If the first operand is non-negative or has all low bits zero, then in srem()
1065 // the upper bits are all zero. in srem()
1066 if (LHS.isNonNegative() || LowBits.isSubsetOf(LHS.Zero)) in srem()
1067 Known.Zero |= ~LowBits; in srem()
1069 // If the first operand is negative and not all low bits are zero, then in srem()
1077 // remainder is zero. The magnitude of the result should be less than or in srem()
1080 Known.Zero.setHighBits(LHS.countMinLeadingZeros()); in srem()
1086 Zero |= RHS.Zero; in operator &=()
1094 Zero &= RHS.Zero; in operator |=()
1102 APInt Z = (Zero & RHS.Zero) | (One & RHS.One); in operator ^=()
1104 One = (Zero & RHS.One) | (One & RHS.Zero); in operator ^=()
1105 Zero = std::move(Z); in operator ^=()
1111 KnownBits Known(Zero, APInt(BitWidth, 0)); in blsi()
1113 Known.Zero.setBitsFrom(std::min(Max + 1, BitWidth)); in blsi()
1124 Known.Zero.setBitsFrom(std::min(Max + 1, BitWidth)); in blsmsk()
1134 if (Zero[N] && One[N]) in print()
1136 else if (Zero[N]) in print()