From 201cf7ea262385275b632689d3ba5ecf97d36679 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 4 Aug 2017 16:08:41 +0000 Subject: [PATCH] [InstCombine] Fold single-use variable into assert. Avoids unused variable warnings in Release builds. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310064 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/InstCombine/InstCombineShifts.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/InstCombine/InstCombineShifts.cpp b/lib/Transforms/InstCombine/InstCombineShifts.cpp index f4e2458fba2..2b20d8e0357 100644 --- a/lib/Transforms/InstCombine/InstCombineShifts.cpp +++ b/lib/Transforms/InstCombine/InstCombineShifts.cpp @@ -682,8 +682,8 @@ Instruction *InstCombiner::visitLShr(BinaryOperator &I) { if (match(Op0, m_OneUse(m_ZExt(m_Value(X)))) && (!Ty->isIntegerTy() || shouldChangeType(Ty, X->getType()))) { - unsigned SrcTyBitWidth = X->getType()->getScalarSizeInBits(); - assert(ShAmt < SrcTyBitWidth && "Big shift not simplified to zero?"); + assert(ShAmt < X->getType()->getScalarSizeInBits() && + "Big shift not simplified to zero?"); // lshr (zext iM X to iN), C --> zext (lshr X, C) to iN Value *NewLShr = Builder.CreateLShr(X, ShAmt); return new ZExtInst(NewLShr, Ty); -- 2.50.1