[llvm] r269729 - try to avoid unused variable warning in release build; NFCI
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon May 16 18:12:31 PDT 2016
Author: spatel
Date: Mon May 16 20:12:31 2016
New Revision: 269729
URL: http://llvm.org/viewvc/llvm-project?rev=269729&view=rev
Log:
try to avoid unused variable warning in release build; 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=269729&r1=269728&r2=269729&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Mon May 16 20:12:31 2016
@@ -3121,7 +3121,8 @@ static ICmpInst *canonicalizeCmpWithCons
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()) {
More information about the llvm-commits
mailing list