]> granicus.if.org Git - llvm/commitdiff
Do not declare a variable which is used only in assert. NFC
authorMax Kazantsev <max.kazantsev@azul.com>
Fri, 4 Aug 2017 07:41:24 +0000 (07:41 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Fri, 4 Aug 2017 07:41:24 +0000 (07:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310034 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp

index 6c136a6f87a1916cfbd38f789371b913d98c4b0a..bc026ec959e3df73f94ddd518f9ef8df78e2d033 100644 (file)
@@ -1608,8 +1608,7 @@ InductiveRangeCheck::computeSafeIterationSpace(
   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);