Skip to content

Commit 18b9fc4

Browse files
committed
[InstructionSimplify] SimplifyShift - rename shift amount KnownBits. NFCI.
As suggested on D97305.
1 parent 64d8c78 commit 18b9fc4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Analysis/InstructionSimplify.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,14 +1262,14 @@ static Value *SimplifyShift(Instruction::BinaryOps Opcode, Value *Op0,
12621262

12631263
// If any bits in the shift amount make that value greater than or equal to
12641264
// the number of bits in the type, the shift is undefined.
1265-
KnownBits Known = computeKnownBits(Op1, Q.DL, 0, Q.AC, Q.CxtI, Q.DT);
1266-
if (Known.getMinValue().uge(Known.getBitWidth()))
1265+
KnownBits KnownAmt = computeKnownBits(Op1, Q.DL, 0, Q.AC, Q.CxtI, Q.DT);
1266+
if (KnownAmt.getMinValue().uge(KnownAmt.getBitWidth()))
12671267
return PoisonValue::get(Op0->getType());
12681268

12691269
// If all valid bits in the shift amount are known zero, the first operand is
12701270
// unchanged.
1271-
unsigned NumValidShiftBits = Log2_32_Ceil(Known.getBitWidth());
1272-
if (Known.countMinTrailingZeros() >= NumValidShiftBits)
1271+
unsigned NumValidShiftBits = Log2_32_Ceil(KnownAmt.getBitWidth());
1272+
if (KnownAmt.countMinTrailingZeros() >= NumValidShiftBits)
12731273
return Op0;
12741274

12751275
return nullptr;

0 commit comments

Comments
 (0)