summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-08-29 09:58:47 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-08-29 09:58:47 +0000
commitef9c6a70776f4c36267b4a0d311bc8bfb52f8576 (patch)
tree33848c313b81366c57cd6b8e92f79eb9c091ce0d /llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
parent250cef2c7dbcf1d7ae463d548025d93001ceea07 (diff)
downloadbcm5719-llvm-ef9c6a70776f4c36267b4a0d311bc8bfb52f8576.tar.gz
bcm5719-llvm-ef9c6a70776f4c36267b4a0d311bc8bfb52f8576.zip
Fix variable set but no used warning on NDEBUG builds. NFCI.
llvm-svn: 370317
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 3a01d9cb4f4..940e5554bb3 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/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<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,
OpenPOWER on IntegriCloud