[llvm] r310034 - Do not declare a variable which is used only in assert. NFC

Max Kazantsev via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 00:41:24 PDT 2017


Author: mkazantsev
Date: Fri Aug  4 00:41:24 2017
New Revision: 310034

URL: http://llvm.org/viewvc/llvm-project?rev=310034&view=rev
Log:
Do not declare a variable which is used only in assert. NFC

Modified:
    llvm/trunk/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp?rev=310034&r1=310033&r2=310034&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp Fri Aug  4 00:41:24 2017
@@ -1608,8 +1608,7 @@ InductiveRangeCheck::computeSafeIteratio
   if (D != B)
     return None;
 
-  ConstantInt *ConstD = D->getValue();
-  assert(!ConstD->isZero() && "Recurrence with zero step?");
+  assert(!D->getValue()->isZero() && "Recurrence with zero step?");
 
   const SCEV *M = SE.getMinusSCEV(C, A);
   const SCEV *Begin = SE.getNegativeSCEV(M);




More information about the llvm-commits mailing list