diff options
| author | Shuxin Yang <shuxin.llvm@gmail.com> | 2013-01-07 18:59:35 +0000 |
|---|---|---|
| committer | Shuxin Yang <shuxin.llvm@gmail.com> | 2013-01-07 18:59:35 +0000 |
| commit | 4fb504fec1a97be27e1130ab53aa169120339464 (patch) | |
| tree | 803191d2180b6e15822a218a4c1640eb42530ccd /llvm/lib | |
| parent | a9cc2491dde81261044a4ac21798fcfeb6c83d8a (diff) | |
| download | bcm5719-llvm-4fb504fec1a97be27e1130ab53aa169120339464.tar.gz bcm5719-llvm-4fb504fec1a97be27e1130ab53aa169120339464.zip | |
Implement APFloat::isDenormal()
llvm-svn: 171764
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Support/APFloat.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp index 17f38918b32..0e3c619170d 100644 --- a/llvm/lib/Support/APFloat.cpp +++ b/llvm/lib/Support/APFloat.cpp @@ -697,6 +697,13 @@ APFloat::operator=(const APFloat &rhs) } bool +APFloat::isDenormal() const { + return isNormal() && (exponent == semantics->minExponent) && + (APInt::tcExtractBit(significandParts(), + semantics->precision - 1) == 0); +} + +bool APFloat::bitwiseIsEqual(const APFloat &rhs) const { if (this == &rhs) return true; |

