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 | 7aa1c321f00d29fdc84e9a03080853aa25dd06fc (patch) | |
tree | 013045c273e9f818563d36147da2af4326e82721 /lib/Support/APFloat.cpp | |
parent | 637582eaf77e6892094cea0bf6b9483f50b5d94e (diff) |
Implement APFloat::isDenormal()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171764 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/APFloat.cpp')
-rw-r--r-- | lib/Support/APFloat.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp index 17f38918b3..0e3c619170 100644 --- a/lib/Support/APFloat.cpp +++ b/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; |