search for: fmuladd

Displaying 20 results from an estimated 48 matches for "fmuladd".

2012 Dec 13
3
[LLVMdev] Question about FMA formation
A little background: The fmuladd intrinsic was introduced to support the FP_CONTRACT pragma in C. llvm.fmuladd.* is generated by clang when it sees an expression of the form 'a * b + c' within a single source statement. If you want to opportunistically form FMA target instructions my inclination would be to skip llvm.fmu...
2015 Jan 28
4
[LLVMdev] RFC: Add ISD nodes for mad
Hi, I would like to add an ISD node for an fmad operation (named either FMAD or FMULADD). It will have the semantics of returning the same result as the separate multiply and add with the intermediate rounding step, and not a differently rounded result. The motivation is to share code with the various FMA forming DAG combines, but will be generally more useful on targets that sup...
2013 Jan 14
0
[LLVMdev] Documentation of fmuladd intrinsic
Thanks for all the replies - it pretty much confirmed what I think I'd worked out about how fmuladd is supposed to behave. But my initial query wasn't asking what fmuladd did - it was asking for the documentation about it to be clarified. Can I suggest that the Overview section for fmuladd is changed to say the following (the key point being the removal of the word "legal" in the d...
2013 Jan 11
2
[LLVMdev] Documentation of fmuladd intrinsic
The fmuladd intrinsic is described as saying that a multiply and addition sequence can be fused into an fma instruction "if the code generator determines that the fused expression would be legal and efficient". (http://llvm.org/docs/LangRef.html#llvm-fma-intrinsic) I've spent a bit of time puzzl...
2013 Jan 11
1
[LLVMdev] Documentation of fmuladd intrinsic
Hal Finkel <hfinkel at anl.gov> writes: > There are a few conditions that contribute to the decision of whether > or not to make the fmuladd -> fma translation. The relevant code is in > CodeGen/SelectionDAG/SelectionDAGBuilder.cpp: > > case Intrinsic::fmuladd: { > EVT VT = TLI.getValueType(I.getType()); > if (TM.Options.AllowFPOpFusion != FPOpFusion::Strict && > TLI.isOperationLegal(ISD::F...
2013 Jan 11
1
[LLVMdev] Documentation of fmuladd intrinsic
...gmail.com> > To: "Hal Finkel" <hfinkel at anl.gov> > Cc: "David A. Greene" <dag at cray.com>, "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> > Sent: Friday, January 11, 2013 2:19:01 PM > Subject: Re: [LLVMdev] Documentation of fmuladd intrinsic > > > On Fri, Jan 11, 2013 at 3:16 PM, Hal Finkel < hfinkel at anl.gov > > wrote: > > > > > > ----- Original Message ----- > > From: dag at cray.com > > To: "Justin Holewinski" < justin.holewinski at gmail.com > > &...
2012 Dec 13
0
[LLVMdev] Question about FMA formation
Hi, Eli, Mike and Lang: Thank you all for the input. This is one e.g which might be difficult for isel: a*b + c*d + e => a*b + (c*d + e). Thanks Shuxin On 12/12/12 4:43 PM, Lang Hames wrote: > A little background: > > The fmuladd intrinsic was introduced to support the FP_CONTRACT pragma > in C. llvm.fmuladd.* is generated by clang when it sees an expression > of the form 'a * b + c' within a single source statement. > > If you want to opportunistically form FMA target instructions my > inclinatio...
2013 Jan 11
0
[LLVMdev] Documentation of fmuladd intrinsic
...olewinski" <justin.holewinski at gmail.com> > > Cc: "Hal Finkel" <hfinkel at anl.gov>, "LLVM Developers Mailing List" < > llvmdev at cs.uiuc.edu> > > Sent: Friday, January 11, 2013 2:13:50 PM > > Subject: Re: [LLVMdev] Documentation of fmuladd intrinsic > > > > Justin Holewinski <justin.holewinski at gmail.com> writes: > > > > > Out of curiosity, what is the use-case for > > > isFMAFasterThanMulAndAdd? > > > If a target declares that FMA is actually slower for a given type, > > &g...
2013 Jan 11
0
[LLVMdev] Documentation of fmuladd intrinsic
----- Original Message ----- > From: "Cameron McInally" <cameron.mcinally at nyu.edu> > To: "Andrew Booker" <andrew.booker at arm.com> > Cc: llvmdev at cs.uiuc.edu > Sent: Friday, January 11, 2013 12:37:07 PM > Subject: Re: [LLVMdev] Documentation of fmuladd intrinsic > > > On Fri, Jan 11, 2013 at 1:08 PM, Andrew Booker < > andrew.booker at arm.com > wrote: > > > > The fmuladd intrinsic is described as saying that a multiply and > addition sequence can be fused into an fma instruction "if the code > generat...
2013 Jan 11
2
[LLVMdev] Documentation of fmuladd intrinsic
...t; To: "Justin Holewinski" <justin.holewinski at gmail.com> > Cc: "Hal Finkel" <hfinkel at anl.gov>, "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> > Sent: Friday, January 11, 2013 2:13:50 PM > Subject: Re: [LLVMdev] Documentation of fmuladd intrinsic > > Justin Holewinski <justin.holewinski at gmail.com> writes: > > > Out of curiosity, what is the use-case for > > isFMAFasterThanMulAndAdd? > >  If a target declares that FMA is actually slower for a given type, > > why not just declare it as ill...
2013 Jul 08
1
[LLVMdev] API break for out-of-tree targets implementing TargetLoweringBase::isFMAFasterThanMulAndAdd
...look at in-tree target implementations as an example. Please let me know if there are any objections before tomorrow morning. Stephen ---------- Forwarded message ---------- From: Stephen Lin <swlin at post.harvard.edu> Date: Sun, Jul 7, 2013 at 9:25 PM Subject: [PATCH] Resolve issues with fmuladd intrinsic handling across multiple backends To: llvm-commits at cs.uiuc.edu Hi, While working on another patch, I discovered multiple related issues with fmuladd intrinsic handling which I believe the attached patch resolves. Currently, the operation depends on the target's implementation o...
2012 Dec 13
0
[LLVMdev] Question about FMA formation
...39;m going implement FMA formation. On some architectures, "FMA a, b, c" is more precise than > "a * b + c". I'm wondering if FMA could be less precise. In the former case, can we enable FMA > formation despite restrictive FP mode? > I believe that a pass to form fmuladd[1] intrinsic calls would be very useful! The fmuladd intrinsic is defined such that its formation should be isolated from worries about strictness. It simply means "a * b + c" and leaves the decision of whether or not to fuse up to the code generator. Of course, one probably would only ru...
2013 Jan 11
3
[LLVMdev] Documentation of fmuladd intrinsic
On Fri, Jan 11, 2013 at 1:08 PM, Andrew Booker <andrew.booker at arm.com>wrote: > The fmuladd intrinsic is described as saying that a multiply and > addition sequence can be fused into an fma instruction "if the code > generator determines that the fused expression would be legal and > efficient". (http://llvm.org/docs/LangRef.html#llvm-fma-intrinsic) > > I've s...
2013 Apr 25
1
[LLVMdev] getNodePriority()
We have a function that has 256 loads and 256 fmuladds. This block of operations is bounded at either end by an OpenCL barrier (an AMDIL fence instruction). The loads and multiply/adds are ordinarily interleaved... that is, the IR going in to code generation looks like: %39 = load float addrspace(3)* getelementptr inbounds ([16 x [17 x float]] addrs...
2012 Dec 12
3
[LLVMdev] Question about FMA formation
Hi, Dear All: I'm going implement FMA formation. On some architectures, "FMA a, b, c" is more precise than "a * b + c". I'm wondering if FMA could be less precise. In the former case, can we enable FMA formation despite restrictive FP mode? Thanks Shuxin
2016 Nov 19
2
FMA canonicalization in IR
...ateright.com>> wrote: > > If I have my FMA intrinsics story straight now (thanks for the explanation, Hal!), I think it raises another question about IR canonicalization (and may affect the proposed revision to IR FMF): No, I think that we specifically don't want to canonicalize to fmuladd at the IR level at all. If the backend has the freedom to form FMAs as it sees fit, then we should delay the decision until whenever the backend finds most appropriate. Some backends, for example, form FMAs using the MachineCombiner pass which considers critical path, latency, throughputs, etc. in...
2013 Jan 11
3
[LLVMdev] Documentation of fmuladd intrinsic
...----- > > From: "Cameron McInally" <cameron.mcinally at nyu.edu> > > To: "Andrew Booker" <andrew.booker at arm.com> > > Cc: llvmdev at cs.uiuc.edu > > Sent: Friday, January 11, 2013 12:37:07 PM > > Subject: Re: [LLVMdev] Documentation of fmuladd intrinsic > > > > > > On Fri, Jan 11, 2013 at 1:08 PM, Andrew Booker < > > andrew.booker at arm.com > wrote: > > > > > > > > The fmuladd intrinsic is described as saying that a multiply and > > addition sequence can be fused into an fma in...
2016 Nov 20
5
FMA canonicalization in IR
...ry straight now (thanks for the > > > explanation, Hal!), I think it raises another question about IR > > > canonicalization (and may affect the proposed revision to IR FMF): > > > > > > No, I think that we specifically don't want to canonicalize to > > fmuladd at the IR level at all. If the backend has the freedom to > > form FMAs as it sees fit, then we should delay the decision until > > whenever the backend finds most appropriate. Some backends, for > > example, form FMAs using the MachineCombiner pass which considers > > criti...
2013 Jan 11
0
[LLVMdev] Documentation of fmuladd intrinsic
Justin Holewinski <justin.holewinski at gmail.com> writes: > Out of curiosity, what is the use-case for isFMAFasterThanMulAndAdd? >  If a target declares that FMA is actually slower for a given type, > why not just declare it as illegal for that type?  Wouldn't that > accomplish the same thing without another target hook?  I feel like I'm > missing something here.
2012 Dec 13
2
[LLVMdev] Question about FMA formation
...d (fadd (fmul a b) (fmul c d)) e) How would your pass go about handling these patterns and is that something that would be too complicated for fast-isel to do on the fly? > Thanks > Shuxin > > On 12/12/12 4:43 PM, Lang Hames wrote: >> A little background: >> >> The fmuladd intrinsic was introduced to support the FP_CONTRACT pragma in C. llvm.fmuladd.* is generated by clang when it sees an expression of the form 'a * b + c' within a single source statement. >> >> If you want to opportunistically form FMA target instructions my inclination would b...