[LLVMdev] Need help in converting int to double
James.Molloy at arm.com
Thu Sep 22 02:42:19 PDT 2011
If you can only hold doubles (not integers), and you originally converted the doubles to integers to do an integer shift, why can you not just convert the result back to a double using CreateFPToSI ?
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of sarath chandra
Sent: 22 September 2011 10:37
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] Need help in converting int to double
Now i'm writing code for shift left(SHL) operator. I had my own Value Structure .. it's like this
void *val ;
The "char type" holds DoubleType,DoubleConst,StringType,StringConst...
when i'm executing the IrBuilder.CreateShl(LHS,RHS) instruction it is returning an integer value as output.. i'm unable to store the value in my structure....(because my structure can hold Doubles,Strings).
Is there any way to store the integer output in my structure( i used CreateSIToFP() to change int to double)........
Thanks in advance
-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev