From 093399cbf3bcdb31d04b3bf5c5691fc88c25da48 Mon Sep 17 00:00:00 2001 From: Nadav Rotem Date: Thu, 17 Feb 2011 21:22:27 +0000 Subject: Enhance constant folding of bitcast operations on vectors of floats. Add getAllOnesValue of FP numbers to Constants and APFloat. Add more tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125776 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/APFloat.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/Support/APFloat.cpp') diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp index 6d018afa3f..e765ba0a27 100644 --- a/lib/Support/APFloat.cpp +++ b/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); -- cgit v1.2.3-18-g5258