Skip to content

Commit

Permalink
[ValueTracking] computeKnownBitsFromShiftOperator - consistently use …
Browse files Browse the repository at this point in the history
…Known2 for the shifted value. NFCI.

Minor cleanup as part of getting D90479 moving again.
  • Loading branch information
RKSimon committed Nov 10, 2020
1 parent c7e2753 commit 929a127
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions llvm/lib/Analysis/ValueTracking.cpp
Expand Up @@ -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.
Expand Down

0 comments on commit 929a127

Please sign in to comment.