[llvm] 929a127 - [ValueTracking] computeKnownBitsFromShiftOperator - consistently use Known2 for the shifted value. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 10 09:15:56 PST 2020
Author: Simon Pilgrim
Date: 2020-11-10T17:03:17Z
New Revision: 929a127932b4ad39551ea844880217a5f12e2034
URL: https://github.com/llvm/llvm-project/commit/929a127932b4ad39551ea844880217a5f12e2034
DIFF: https://github.com/llvm/llvm-project/commit/929a127932b4ad39551ea844880217a5f12e2034.diff
LOG: [ValueTracking] computeKnownBitsFromShiftOperator - consistently use Known2 for the shifted value. NFCI.
Minor cleanup as part of getting D90479 moving again.
Added:
Modified:
llvm/lib/Analysis/ValueTracking.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index db591ce67709..ce9174bbcdcf 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -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.
More information about the llvm-commits
mailing list