[ValueTracking] computeKnownBitsFromShiftOperator - consistently use Known2 for the shifted value. NFCI.

Minor cleanup as part of getting D90479 moving again.
This commit is contained in:
Simon Pilgrim 2020-11-10 16:33:41 +00:00
parent c7e275388e
commit 929a127932
1 changed files with 3 additions and 3 deletions

View File

@ -995,9 +995,9 @@ static void computeKnownBitsFromShiftOperator(
if (Known.isConstant()) {
unsigned ShiftAmt = Known.getConstant().getLimitedValue(BitWidth - 1);
computeKnownBits(I->getOperand(0), DemandedElts, Known, Depth + 1, Q);
Known.Zero = KZF(Known.Zero, ShiftAmt);
Known.One = KOF(Known.One, ShiftAmt);
computeKnownBits(I->getOperand(0), DemandedElts, Known2, Depth + 1, Q);
Known.Zero = KZF(Known2.Zero, ShiftAmt);
Known.One = KOF(Known2.One, ShiftAmt);
// If the known bits conflict, this must be an overflowing left shift, so
// the shift result is poison. We can return anything we want. Choose 0 for
// the best folding opportunity.