[llvm-commits] [llvm] r51268 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/sitofp.ll

Dale Johannesen dalej at apple.com
Mon May 19 13:34:32 PDT 2008


This is fltSemantics.precision.

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.
> +}
> +




More information about the llvm-commits mailing list