[llvm] r304857 - [LazyValueInfo] Remove redundant calls to ConstantRange::contains. The same exact call was made in the if above and we already know it returned true. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 6 17:58:09 PDT 2017
Author: ctopper
Date: Tue Jun 6 19:58:09 2017
New Revision: 304857
URL: http://llvm.org/viewvc/llvm-project?rev=304857&view=rev
Log:
[LazyValueInfo] Remove redundant calls to ConstantRange::contains. The same exact call was made in the if above and we already know it returned true. NFC
Modified:
llvm/trunk/lib/Analysis/LazyValueInfo.cpp
Modified: llvm/trunk/lib/Analysis/LazyValueInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyValueInfo.cpp?rev=304857&r1=304856&r2=304857&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LazyValueInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/LazyValueInfo.cpp Tue Jun 6 19:58:09 2017
@@ -1684,13 +1684,13 @@ static LazyValueInfo::Tristate getPredic
if (!CR.contains(CI->getValue()))
return LazyValueInfo::False;
- if (CR.isSingleElement() && CR.contains(CI->getValue()))
+ if (CR.isSingleElement())
return LazyValueInfo::True;
} else if (Pred == ICmpInst::ICMP_NE) {
if (!CR.contains(CI->getValue()))
return LazyValueInfo::True;
- if (CR.isSingleElement() && CR.contains(CI->getValue()))
+ if (CR.isSingleElement())
return LazyValueInfo::False;
}
More information about the llvm-commits
mailing list