add a nice predicate to check to see if nan

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43304 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-10-24 18:54:28 +00:00
parent 975de81086
commit 10c42185d8

View File

@ -232,6 +232,7 @@ namespace llvm {
const fltSemantics &getSemantics() const { return *semantics; }
bool isZero() const { return category == fcZero; }
bool isNonZero() const { return category != fcZero; }
bool isNaN() const { return category == fcNaN; }
bool isNegative() const { return sign; }
bool isPosZero() const { return isZero() && !isNegative(); }
bool isNegZero() const { return isZero() && isNegative(); }