search for: createsitofp

Displaying 9 results from an estimated 9 matches for "createsitofp".

2011 Sep 22
3
[LLVMdev] Need help in converting int to double
...gConst... 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 Regards, (¨`·.·´¨) `·.¸(¨`·.·´¨) (¨`·.·´¨)¸.·´ Sarath!!! `·.¸.·´ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110922/8d527324/attachment.h...
2011 Sep 22
2
[LLVMdev] Need help in converting int to double
...e: >> Hi Sarath, >> >> 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 ? >> >> CreateFPToSI(CreateShr(CreateSIToFP(arg0), CreateSIToFP(arg1))) >> >> Cheers, >> >> James >> >> 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 >> Subje...
2011 Sep 22
0
[LLVMdev] FW: Need help in converting int to double
...at 3:12 PM, James Molloy <James.Molloy at arm.com> wrote: Hi Sarath, 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 ? CreateFPToSI(CreateShr(CreateSIToFP(arg0), CreateSIToFP(arg1))) Cheers, James 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 Hi, I'm pursuing M.Tech...
2011 Sep 22
0
[LLVMdev] Need help in converting int to double
...loy at arm.com<mailto:James.Molloy at arm.com>> wrote: Hi Sarath, 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 ? CreateFPToSI(CreateShr(CreateSIToFP(arg0), CreateSIToFP(arg1))) Cheers, James From: llvmdev-bounces at cs.uiuc.edu<mailto:llvmdev-bounces at cs.uiuc.edu> [mailto: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&lt...
2011 Sep 22
1
[LLVMdev] Need help in converting int to double
...loy at arm.com> > wrote: > Hi Sarath, > > 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 ? > > CreateFPToSI(CreateShr(CreateSIToFP(arg0), CreateSIToFP(arg1))) > > Cheers, > > James > > 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 in...
2009 Jun 05
2
[LLVMdev] Int1 to Double Type Conversion
Hello, I would like to know if there is an instruction to convert values from the Int1 type to the Double type in LLVM. I would like to achieve the equivalent of casting a bool value to a double value in C++. Doing the simple CreateSIToFP or CreateUIToFP does not work, it throws an assertion ("invalid cast"). I simply want to avoid branching it's not necessary. What's the simplest way to achieve this? Thank you for your time, - Max -- View this message in context: http://www.nabble.com/Int1-to-Double-Type-Conver...
2009 Jun 05
0
[LLVMdev] Int1 to Double Type Conversion
...x<mcheva at cs.mcgill.ca> wrote: > > Hello, > > I would like to know if there is an instruction to convert values from the > Int1 type to the Double type in LLVM. I would like to achieve the equivalent > of casting a bool value to a double value in C++. Doing the simple > CreateSIToFP or CreateUIToFP does not work, it throws an assertion ("invalid > cast"). I simply want to avoid branching it's not necessary. What's the > simplest way to achieve this? The following LLVM assembly seems to compile just fine: define double @a(i1 zeroext %x) nounwind { %rval...
2007 Dec 17
0
[LLVMdev] Elsa and LLVM and LLVM submissions
...r > *Name = ""){ > + return CreateCast(Instruction::FPToSI, V, DestTy, Name); > + } > + Value *CreateUIToFP(Value *V, const Type *DestTy, const char > *Name = ""){ > + return CreateCast(Instruction::UIToFP, V, DestTy, Name); > + } > + Value *CreateSIToFP(Value *V, const Type *DestTy, const char > *Name = ""){ > + return CreateCast(Instruction::SIToFP, V, DestTy, Name); > + } > + Value *CreateFPTrunc(Value *V, const Type *DestTy, > + const char *Name = "") { > + return Creat...
2007 Dec 17
2
[LLVMdev] Elsa and LLVM and LLVM submissions
Devang Patel wrote: > On Dec 15, 2007, at 12:15 PM, Richard Pennington wrote: > >> I got the current version of LLVM via svn yesterday and modified my >> code to >> use the LLVMFoldingBuilder. Very nice! >> >> My question is this: I noticed that the folding builder doesn't fold >> some >> operations, e.g. casts. Is there some reason why? If