[InstCombine] Fold single-use variable into assert.
Avoids unused variable warnings in Release builds. No functional change.
llvm-svn: 310064
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
index f4e2458..2b20d8e 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
@@ -682,8 +682,8 @@
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);