if (ConstantFP *RHSC = dyn_cast<ConstantFP>(RHS->getOperand(1))) {
// If either of the constants are nans, then the whole thing returns
// false.
- if (LHSC->getValueAPF().getCategory() == APFloat::fcNaN ||
- RHSC->getValueAPF().getCategory() == APFloat::fcNaN)
+ if (LHSC->getValueAPF().isNaN() || RHSC->getValueAPF().isNaN())
return ReplaceInstUsesWith(I, ConstantInt::getFalse());
return new FCmpInst(FCmpInst::FCMP_ORD, LHS->getOperand(0),
RHS->getOperand(0));
if (ConstantFP *RHSC = dyn_cast<ConstantFP>(RHS->getOperand(1))) {
// If either of the constants are nans, then the whole thing returns
// true.
- if (LHSC->getValueAPF().getCategory() == APFloat::fcNaN ||
- RHSC->getValueAPF().getCategory() == APFloat::fcNaN)
+ if (LHSC->getValueAPF().isNaN() || RHSC->getValueAPF().isNaN())
return ReplaceInstUsesWith(I, ConstantInt::getTrue());
// Otherwise, no need to compare the two constants, compare the