From c2790ecda811054e2146aad532d4cbe93f1050b1 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 6 Jun 2017 07:13:04 +0000 Subject: [PATCH] [InstSimplify] Use ICmpInst::isEquality predicate method. NFC llvm-svn: 304770 --- llvm/lib/Analysis/InstructionSimplify.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp index c19af1b5ff7a..d5b93caf714c 100644 --- a/llvm/lib/Analysis/InstructionSimplify.cpp +++ b/llvm/lib/Analysis/InstructionSimplify.cpp @@ -3308,7 +3308,7 @@ static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS, } // 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 ?