foad added a comment. When I suggested using computeKnownFPClass I meant something like this: https://reviews.llvm.org/differential/diff/517952/ Further cleanups are possible. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146737/new/ https://reviews.llvm.org/D146737