]> granicus.if.org Git - llvm/commitdiff
Fix variable set but no used warning on NDEBUG builds. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 29 Aug 2019 09:58:47 +0000 (09:58 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 29 Aug 2019 09:58:47 +0000 (09:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370317 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineCompares.cpp

index 3a01d9cb4f4fafdf31639f2fe7b8ea439b71a496..940e5554bb331a0f9a9ea8859672ff34baac8b19 100644 (file)
@@ -4981,9 +4981,9 @@ llvm::getFlippedStrictnessPredicateAndConstant(CmpInst::Predicate Pred,
   // For scalars, SimplifyICmpInst should have already handled
   // the edge cases for us, so we just assert on them.
   // For vectors, we must handle the edge cases.
-  if (auto *CI = dyn_cast<ConstantInt>(C)) {
+  if (isa<ConstantInt>(C)) {
     // A <= MAX -> TRUE ; A >= MIN -> TRUE
-    assert(ConstantIsOk(CI));
+    assert(ConstantIsOk(cast<ConstantInt>(C)));
   } else if (Type->isVectorTy()) {
     // TODO? If the edge cases for vectors were guaranteed to be handled as they
     // are for scalar, we could remove the min/max checks. However, to do that,