[llvm] r370317 - Fix variable set but no used warning on NDEBUG builds. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 02:58:48 PDT 2019
Author: rksimon
Date: Thu Aug 29 02:58:47 2019
New Revision: 370317
URL: http://llvm.org/viewvc/llvm-project?rev=370317&view=rev
Log:
Fix variable set but no used warning on NDEBUG builds. NFCI.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=370317&r1=370316&r2=370317&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Thu Aug 29 02:58:47 2019
@@ -4981,9 +4981,9 @@ llvm::getFlippedStrictnessPredicateAndCo
// 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,
More information about the llvm-commits
mailing list