summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-05-17 01:12:31 +0000
committerSanjay Patel <spatel@rotateright.com>2016-05-17 01:12:31 +0000
commit18254935c9d8f6fcf0e5f20c13d5b4ef5424bf94 (patch)
treea9d0ac76ab4fc08fb6add489db6e1baadaed9712
parente9b2c32e7f0faa0c31c2c1cb44cbe9c9e234cd64 (diff)
downloadbcm5719-llvm-18254935c9d8f6fcf0e5f20c13d5b4ef5424bf94.tar.gz
bcm5719-llvm-18254935c9d8f6fcf0e5f20c13d5b4ef5424bf94.zip
try to avoid unused variable warning in release build; NFCI
llvm-svn: 269729
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 1ecd7aeb549..18036356c92 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -3121,7 +3121,8 @@ static ICmpInst *canonicalizeCmpWithConstant(ICmpInst &I) {
Type *Op1Type = Op1->getType();
bool IsSigned = I.isSigned();
bool IsLE = (Pred == ICmpInst::ICMP_SLE || Pred == ICmpInst::ICMP_ULE);
- if (auto *CI = dyn_cast<ConstantInt>(Op1C)) {
+ auto *CI = dyn_cast<ConstantInt>(Op1C);
+ if (CI) {
// A <= MAX -> TRUE ; A >= MIN -> TRUE
assert(IsLE ? !CI->isMaxValue(IsSigned) : !CI->isMinValue(IsSigned));
} else if (Op1Type->isVectorTy()) {
OpenPOWER on IntegriCloud