- // Note that %less uses an *unordered* comparison. This comparison is true if the operands are
- // not comparable (i.e., if x is NaN). The unordered comparison ensures that s1 becomes
- // int_ty::MIN if x is NaN.
- // Performance note: It can be lowered to a flipped comparison and a negation (and the negation
- // can be merged into the select), so it not necessarily any more expensive than a ordered
- // ("normal") comparison. Whether these optimizations will be performed is ultimately up to the
- // backend but at least x86 does that.
- let less = bcx.fcmp(llvm::RealULT, x, f_min);
+ // Note that %less_or_nan uses an *unordered* comparison. This comparison is true if the
+ // operands are not comparable (i.e., if x is NaN). The unordered comparison ensures that s1
+ // becomes int_ty::MIN if x is NaN.
+ // Performance note: Unordered comparison can be lowered to a "flipped" comparison and a
+ // negation, and the negation can be merged into the select. Therefore, it not necessarily any
+ // more expensive than a ordered ("normal") comparison. Whether these optimizations will be
+ // performed is ultimately up to the backend, but at least x86 does perform them.
+ let less_or_nan = bcx.fcmp(llvm::RealULT, x, f_min);