[LLVMdev] get unsigned integer pattern for ConstantFP

reed kotler rkotler at mips.com
Mon May 5 11:27:52 PDT 2014


On 05/05/2014 11:06 AM, Matt Arsenault wrote:
> On 05/05/2014 10:12 AM, reed kotler wrote:
>> What is the proper way to get the bit pattern associated with a 
>> ConstantFP?
>>
>> The 32 bit pattern if MVT::f32 or pair of 32 bit patterns with 
>> MVT::f64 ?
>>
> I recently did this, and I used 
> ConstantFP::getValueAPF().bitcastToAPInt()

What about rounding?

I guess it will give the proper rounded value for MVT:f32 or MVT:64?






More information about the llvm-dev mailing list