@@ -111,7 +111,7 @@ ConstantFPRange ConstantFPRange::getNonNaN(const fltSemantics &Sem) {
111111// / Return [-inf, V) or [-inf, V]
112112static ConstantFPRange makeLessThan (APFloat V, FCmpInst::Predicate Pred) {
113113 const fltSemantics &Sem = V.getSemantics ();
114- if (!(Pred & FCmpInst::FCMP_OEQ )) {
114+ if (FCmpInst::isFalseWhenEqual ( FCmpInst::getOrderedPredicate (Pred) )) {
115115 if (V.isNegInfinity ())
116116 return ConstantFPRange::getEmpty (Sem);
117117 V.next (/* nextDown=*/ true );
@@ -123,7 +123,7 @@ static ConstantFPRange makeLessThan(APFloat V, FCmpInst::Predicate Pred) {
123123// / Return (V, +inf] or [V, +inf]
124124static ConstantFPRange makeGreaterThan (APFloat V, FCmpInst::Predicate Pred) {
125125 const fltSemantics &Sem = V.getSemantics ();
126- if (!(Pred & FCmpInst::FCMP_OEQ )) {
126+ if (FCmpInst::isFalseWhenEqual ( FCmpInst::getOrderedPredicate (Pred) )) {
127127 if (V.isPosInfinity ())
128128 return ConstantFPRange::getEmpty (Sem);
129129 V.next (/* nextDown=*/ false );
@@ -135,7 +135,7 @@ static ConstantFPRange makeGreaterThan(APFloat V, FCmpInst::Predicate Pred) {
135135// / Make sure that +0/-0 are both included in the range.
136136static ConstantFPRange extendZeroIfEqual (const ConstantFPRange &CR,
137137 FCmpInst::Predicate Pred) {
138- if (!(Pred & FCmpInst::FCMP_OEQ ))
138+ if (FCmpInst::isFalseWhenEqual ( FCmpInst::getOrderedPredicate (Pred) ))
139139 return CR;
140140
141141 APFloat Lower = CR.getLower ();
0 commit comments