[llvm] r304770 - [InstSimplify] Use ICmpInst::isEquality predicate method. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 6 00:13:04 PDT 2017
Author: ctopper
Date: Tue Jun 6 02:13:04 2017
New Revision: 304770
URL: http://llvm.org/viewvc/llvm-project?rev=304770&view=rev
Log:
[InstSimplify] Use ICmpInst::isEquality predicate method. NFC
Modified:
llvm/trunk/lib/Analysis/InstructionSimplify.cpp
Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=304770&r1=304769&r2=304770&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Tue Jun 6 02:13:04 2017
@@ -3308,7 +3308,7 @@ static Value *SimplifyICmpInst(unsigned
}
// icmp eq|ne X, Y -> false|true if X != Y
- if ((Pred == ICmpInst::ICMP_EQ || Pred == ICmpInst::ICMP_NE) &&
+ if (ICmpInst::isEquality(Pred) &&
isKnownNonEqual(LHS, RHS, Q.DL, Q.AC, Q.CxtI, Q.DT)) {
LLVMContext &Ctx = LHS->getType()->getContext();
return Pred == ICmpInst::ICMP_NE ?
More information about the llvm-commits
mailing list