From: Simon Pilgrim Date: Thu, 29 Aug 2019 09:58:47 +0000 (+0000) Subject: Fix variable set but no used warning on NDEBUG builds. NFCI. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63cd984c945809edc565cd72271687dc368b0c0c;p=llvm Fix variable set but no used warning on NDEBUG builds. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370317 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/InstCombine/InstCombineCompares.cpp b/lib/Transforms/InstCombine/InstCombineCompares.cpp index 3a01d9cb4f4..940e5554bb3 100644 --- a/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -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(C)) { + if (isa(C)) { // A <= MAX -> TRUE ; A >= MIN -> TRUE - assert(ConstantIsOk(CI)); + assert(ConstantIsOk(cast(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,