From 18b9fc48f1b64061699533740dd6218c982f5b58 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 23 Feb 2021 18:08:32 +0000 Subject: [PATCH] [InstructionSimplify] SimplifyShift - rename shift amount KnownBits. NFCI. As suggested on D97305. --- llvm/lib/Analysis/InstructionSimplify.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp index 4c8340c..814881d 100644 --- a/llvm/lib/Analysis/InstructionSimplify.cpp +++ b/llvm/lib/Analysis/InstructionSimplify.cpp @@ -1262,14 +1262,14 @@ static Value *SimplifyShift(Instruction::BinaryOps Opcode, Value *Op0, // If any bits in the shift amount make that value greater than or equal to // the number of bits in the type, the shift is undefined. - KnownBits Known = computeKnownBits(Op1, Q.DL, 0, Q.AC, Q.CxtI, Q.DT); - if (Known.getMinValue().uge(Known.getBitWidth())) + KnownBits KnownAmt = computeKnownBits(Op1, Q.DL, 0, Q.AC, Q.CxtI, Q.DT); + if (KnownAmt.getMinValue().uge(KnownAmt.getBitWidth())) return PoisonValue::get(Op0->getType()); // If all valid bits in the shift amount are known zero, the first operand is // unchanged. - unsigned NumValidShiftBits = Log2_32_Ceil(Known.getBitWidth()); - if (Known.countMinTrailingZeros() >= NumValidShiftBits) + unsigned NumValidShiftBits = Log2_32_Ceil(KnownAmt.getBitWidth()); + if (KnownAmt.countMinTrailingZeros() >= NumValidShiftBits) return Op0; return nullptr; -- 2.7.4