The lowering handles special cases with NaN or infinity like C++. Differential Revision: https://reviews.llvm.org/D105270