Lines Matching full:zero

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