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
This commit is contained in:
Nadav Rotem
2011-02-17 21:22:27 +00:00
parent bd9f6bf5cd
commit 093399cbf3
5 changed files with 62 additions and 4 deletions

View File

@@ -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);