diff options
author | Nadav Rotem <nadav.rotem@intel.com> | 2011-02-17 21:22:27 +0000 |
---|---|---|
committer | Nadav Rotem <nadav.rotem@intel.com> | 2011-02-17 21:22:27 +0000 |
commit | 7cc6d12ad0c963b27feccb35efb92c19f2420522 (patch) | |
tree | e386da6c6cbab295f8e54f3d6bdc35208f49524d /llvm/lib/Support/APFloat.cpp | |
parent | 1af88f12a3ad41c81e49beb2d8db4af4e61c3916 (diff) | |
download | bcm5719-llvm-7cc6d12ad0c963b27feccb35efb92c19f2420522.tar.gz bcm5719-llvm-7cc6d12ad0c963b27feccb35efb92c19f2420522.zip |
Enhance constant folding of bitcast operations on vectors of floats.
Add getAllOnesValue of FP numbers to Constants and APFloat.
Add more tests.
llvm-svn: 125776
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
-rw-r--r-- | llvm/lib/Support/APFloat.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp index 6d018afa3f6..e765ba0a27b 100644 --- a/llvm/lib/Support/APFloat.cpp +++ b/llvm/lib/Support/APFloat.cpp @@ -3197,6 +3197,12 @@ APFloat::initFromAPInt(const APInt& api, bool isIEEE) llvm_unreachable(0); } +APFloat +APFloat::getAllOnesValue(unsigned BitWidth, bool isIEEE) +{ + return APFloat(APInt::getAllOnesValue(BitWidth), isIEEE); +} + APFloat APFloat::getLargest(const fltSemantics &Sem, bool Negative) { APFloat Val(Sem, fcNormal, Negative); |