search for: createfadd

Displaying 20 results from an estimated 34 matches for "createfadd".

Did you mean: createadd
2015 Mar 10
4
[LLVMdev] noob IR builder question
...ello world IR. I am trying to now bring in some concepts from the Kaleidoscope tutorial, namely adding expressions the the IR that is dumped out. I’ve added the following snippets: Value *c1 = ConstantFP::get(context, APFloat(1.0)); Value *c2 = ConstantFP::get(context, APFloat(3.0)); builder.CreateFAdd(c1, c2, "addtmp”); expecting to see an add instruction in the dump, but nothing is added. This seems to be pretty strait from the kaleidoscope examples but I am missing something here I am sure. Here is the full program: 1 using namespace llvm; 2 3 llvm::Module *module; 4 llvm::IRB...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
It seems that the problem was because I used builder.CreateFAdd to create a <2 x double> vectortype FADD instruction. It works if I use it to create the scalar version FADD. I want to have an instruction like: *%2 = fadd <2 x double> undef, <2 x double> undef. *The following is the way I used to create the vectorized FADD instruction: //pInst...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...alue *index0 = ConstantInt::get(u32Ty, 0); Value *index1 = ConstantInt::get(u32Ty, 1); Instruction *InsertVal = InsertElementInst::Create(emptyVec, oprnd, index0, "insert"); InsertVal = InsertElementInst::Create(emptyVec, oprnd, index1, "insert"); vecVal = builder.CreateFAdd(emptyVec, emptyVec, ""); Best, Zhi On Fri, Apr 17, 2015 at 12:17 PM, Nick Lewycky <nicholas at mxc.ca> wrote: > zhi chen wrote: > >> I got it. Thanks, Nick. So, it is back to the previous problem. If I >> have the following instruction: >> >> %3 = fa...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...gt; %4, double %5 where %4 = <double %1, double %1>, %5 = <double %2, double %2>, how can I do this? Thanks, Best On Fri, Apr 17, 2015 at 1:56 AM, Nick Lewycky <nicholas at mxc.ca> wrote: > zhi chen wrote: > >> It seems that the problem was because I used builder.CreateFAdd to >> create a <2 x double> vectortype FADD instruction. It works if I use it >> to create the scalar version FADD. I want to have an instruction like: >> *%2 = fadd <2 x double> undef, <2 x double> undef. *The following is the >> way I used to create the v...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...; to get to it. On Thu, Apr 16, 2015 at 11:39 PM zhi chen <zchenhn at gmail.com> wrote: > But IRBuilder.CreateXYZ only returns a "VALUE" type. Can I get the > instruction created by it? For example, > > IRBuilder<> builder(&*pinst); > Value *val = builder.CreateFAdd(LV, RV, ""); > > How can I get the fadd instruction created by builder? > > On Thu, Apr 16, 2015 at 8:52 PM, zhi chen <zchenhn at gmail.com> wrote: > >> Yes. That's what I was the solution in my mind. But I just wanted to know >> if there was a generic...
2011 Jul 31
2
[LLVMdev] "Cannot select" error in 2.9
...d here: >> <http://llvm.org/releases/2.6/docs/ReleaseNotes.html#coreimprovements>. > > Interesting -- then I guess my question is why 2.8 (which is the first version of LLVM I've used) didn't flag this? > > Either way, it makes sense and changing my API usage to call CreateFAdd instead of CreateAdd fixes this. For a while, we kept some API backwards compatibility magic in place which would forward creations of adds into creations of fadds. Nick
2016 Mar 16
2
IRBuilder Assignment ( '=' ) operator?
In my code assembly system I have the various LH-RH operators, ADD, ADDF, SUB, etc, using CreateAdd, CreateFAdd, etc, however I cant seem to locate the correct function/s for the assignment operator. What's the correct function/s in the IRBuilder for assigning a value? - Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/atta...
2016 Mar 16
3
IRBuilder Assignment ( '=' ) operator?
...ts.llvm.org Subject: Re: [llvm-dev] IRBuilder Assignment ( '=' ) operator? Hi Paul, On 15 March 2016 at 17:59, Paul Hancock via llvm-dev <llvm-dev at lists.llvm.org> wrote: > In my code assembly system I have the various LH-RH operators, ADD, ADDF, > SUB, etc, using CreateAdd, CreateFAdd, etc, however I cant seem to locate > the correct function/s for the assignment operator. The assignment is automatic. The pointer you get back from CreateAdd can be used directly in other instructions. When this is transcribed to the textual IR, LLVM will put in the appropriate assignments (so...
2019 Jan 16
2
[FPEnv] Rust/Go/Swift/Flang/other llvm IRBuilder needs?
I've got a ticket open where I would very much like some input from maintainers of other languages that rely on llvm and use the IRBuilder. See: Teach the IRBuilder about constrained fadd and friends: https://reviews.llvm.org/D53157 I'm adding support to functions like CreateFAdd() the ability to optionally emit the constrained math intrinsics required to support strict floating point mode. This makes the changes in clang relatively easy, but the concern is that there may be concerns that haven't been raised in the diff. And I'd like to tailor the interface so that...
2010 Jun 21
1
[LLVMdev] [PATCH] docs/tutorial/ Kaleidoscope typos
On Mon, 21 Jun 2010 15:31:57 -0500, Chris Lattner <clattner at apple.com> wrote: > Applied in r106468, thanks! > > -Chris I think there's a few bugs left in the Kaleidoscope tutorial -- I noticed somebody converted some of the "Builder.CreateAdd" to CreateFAdd, etc., but there seem to be a few that got missed. Attached diff is what I could find... Kevin Kelley -------------- next part -------------- A non-text attachment was scrubbed... Name: Kaleidoscope-fadd.diff Type: application/octet-stream Size: 2266 bytes Desc: not available URL: <http://l...
2011 Jul 30
2
[LLVMdev] "Cannot select" error in 2.9
On 30 July 2011 23:39, Gregory Junker <gjunker at dayark.com> wrote: >> From: Nick Lewycky [mailto:nicholas at mxc.ca] [snip] >> Gregory Junker wrote: >> > That doesn't make a lot of sense to me -- LLVM can't add doubles? >> >> No, LLVM can't, but it can fadd them. ;) "add" only accepts integers >> and >> vectors of integers,
2011 Jul 30
0
[LLVMdev] "Cannot select" error in 2.9
...o. It's documented here: > <http://llvm.org/releases/2.6/docs/ReleaseNotes.html#coreimprovements>. Interesting -- then I guess my question is why 2.8 (which is the first version of LLVM I've used) didn't flag this? Either way, it makes sense and changing my API usage to call CreateFAdd instead of CreateAdd fixes this. Thanks Greg
2011 Jul 31
0
[LLVMdev] "Cannot select" error in 2.9
...vm.org/releases/2.6/docs/ReleaseNotes.html#coreimprovements>. > > > > Interesting -- then I guess my question is why 2.8 (which is the > first version of LLVM I've used) didn't flag this? > > > > Either way, it makes sense and changing my API usage to call > CreateFAdd instead of CreateAdd fixes this. > > For a while, we kept some API backwards compatibility magic in place > which would forward creations of adds into creations of fadds. > > Nick Figured it might be something like that. ;) Thanks again! Greg
2013 May 22
1
[LLVMdev] Best strategy to add a parameter to a function
I am trying to build a function (C++ Builder) and at the same time extend its parameter set. Here's what I try to do: Value* arg0 = add_param_float("arg0"); Value* tmp = builder->CreateFAdd(arg0,some_previous_value); Value* arg1 = add_param_float("arg1"); The function add_param_float should add a 'float' parameter to the function and return its value. Right now it's implemented like this Value* add_param_float() { return new llvm::Argument( llvm::Type::g...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
Yes. That's what I was the solution in my mind. But I just wanted to know if there was a generic way to save some code... On Thu, Apr 16, 2015 at 8:32 PM, Tim Northover <t.p.northover at gmail.com> wrote: > > I understand that I can detect the operation first, and use "create" to > > create for each of them. But I don't if there is a generic way to do this
2016 Mar 16
3
IRBuilder Assignment ( '=' ) operator?
...lder Assignment ( '=' ) operator? Hi Paul, On 15 March 2016 at 17:59, Paul Hancock via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: > In my code assembly system I have the various LH-RH operators, ADD, ADDF, > SUB, etc, using CreateAdd, CreateFAdd, etc, however I cant seem to locate > the correct function/s for the assignment operator. The assignment is automatic. The pointer you get back from CreateAdd can be used directly in other instructions. When this is transcribed to the textual IR, LLVM will put in the appropriate assignments (so...
2010 Mar 18
0
[LLVMdev] Does it cache the compiled code of executed functions upon runFunction(..)?
I think I found the cause. It appears that FP operations and functions (I used combinations of CreateFMulL CreateFAdd and CreateFSub ) is MUCH slower than their integer equivalents. I mean really slower (20x slower or even more) Can It be the cause ? Does the FP binary ops are so slow ? -- Regards, Gabi http://bugspy.net
2010 Jun 03
2
[LLVMdev] [PATCH] docs/tutorial/ Kaleidoscope typos
Index: docs/tutorial/LangImpl6.html =================================================================== --- docs/tutorial/LangImpl6.html (revision 105365) +++ docs/tutorial/LangImpl6.html (working copy) @@ -531,7 +531,7 @@ def unary-(v) 0-v; -# Define &gt; with the same precedence as &gt;. +# Define &gt; with the same precedence as &lt;. def binary&gt; 10 (LHS RHS)
2010 Jun 21
0
[LLVMdev] [PATCH] docs/tutorial/ Kaleidoscope typos
Applied in r106468, thanks! -Chris On Jun 2, 2010, at 5:23 PM, Adam Warner wrote: > Index: docs/tutorial/LangImpl6.html > =================================================================== > --- docs/tutorial/LangImpl6.html (revision 105365) > +++ docs/tutorial/LangImpl6.html (working copy) > @@ -531,7 +531,7 @@ > def unary-(v) > 0-v; > > -# Define &gt; with
2020 Nov 06
4
Loop-vectorizer prototype for the EPI Project based on the RISC-V Vector Extension (Scalable vectors)
...l @llvm.vscale() ; AVX: ; %mask = icmp (%i + (seq <8 x i32> 0,1,2,.,)), %n, ; %evl = i32 8 ; Configure the Vector Predication builder to use those VPBuilder .setExplicitVectorLength(%evl) .setMask(%mask); ; Start buildling vector-predicated instructions VPBuilder.createFadd(%x, %y) ; --> call @llvm.vp.fadd(%x, %y, %mask, %evl) Looks to me the second option makes a more effective use of vpred and D78203 shows that we can always soften vpred into a shape that is reasonable for lowering in targets without active vector length. The whole point about VP is to make...