[llvm-commits] [llvm] r51268 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/sitofp.ll
Chris Lattner
clattner at apple.com
Mon May 19 14:04:32 PDT 2008
On May 19, 2008, at 1:34 PM, Dale Johannesen wrote:
> This is fltSemantics.precision.
Unfortunately, that isn't public and lies about ppc long double :(.
Moving this to be a helper method on APFloat would make a lot of sense
though. I'll take care of it.
-Chris
>
>
> On May 19, 2008, at 1:18 PM, Chris Lattner wrote:
>
>> +/// GetFPMantissaWidth - Return the width of the mantissa (aka
>> significand) of
>> +/// the specified floating point type in bits. This returns -1 if
>> unknown.
>> +static int GetFPMantissaWidth(const Type *FPType) {
>> + if (FPType == Type::FloatTy)
>> + return 24;
>> + if (FPType == Type::DoubleTy)
>> + return 53;
>> + if (FPType == Type::X86_FP80Ty)
>> + return 64;
>> + return -1; // Unknown/crazy type.
>> +}
>> +
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list