forked from OSchip/llvm-project
[InstSimplify] Use ICmpInst::isEquality predicate method. NFC
llvm-svn: 304770
This commit is contained in:
parent
8cde9a7e77
commit
c2790ecda8
|
@ -3308,7 +3308,7 @@ static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
|
||||||
}
|
}
|
||||||
|
|
||||||
// icmp eq|ne X, Y -> false|true if X != Y
|
// 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)) {
|
isKnownNonEqual(LHS, RHS, Q.DL, Q.AC, Q.CxtI, Q.DT)) {
|
||||||
LLVMContext &Ctx = LHS->getType()->getContext();
|
LLVMContext &Ctx = LHS->getType()->getContext();
|
||||||
return Pred == ICmpInst::ICMP_NE ?
|
return Pred == ICmpInst::ICMP_NE ?
|
||||||
|
|
Loading…
Reference in New Issue