This is the mail archive of the
`gcc@gcc.gnu.org`
mailing list for the GCC project.

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |

Other format: | [Raw text] |

*From*: Tejas Joshi <tejasjoshi9673 at gmail dot com>*To*: gcc at gcc dot gnu dot org*Cc*: Martin Jambor <mjambor at suse dot cz>, hubicka at ucw dot cz, segher at kernel dot crashing dot org, joseph at codesourcery dot com, richard dot sandiford at arm dot com*Date*: Thu, 15 Aug 2019 19:31:29 +0530*Subject*: Re: Expansion of narrowing math built-ins into power instructions*References*: <20190811165916.GX31406@gate.crashing.org> <CACMrGjAPa21OJ_ry+1HPyEQQbZhGOkQTVXwe=CvHsufc_ms_CQ@mail.gmail.com> <20190812175450.GB31406@gate.crashing.org> <alpine.DEB.2.21.1908122118140.18203@digraph.polyomino.org.uk> <20190812215224.GC31406@gate.crashing.org> <CACMrGjDbF8qyaF8_p5ofOT7gFRqMyOTtzxsKRM3r2aXX+8KS+A@mail.gmail.com> <20190814072127.GE31406@gate.crashing.org> <alpine.DEB.2.21.1908141608430.14831@digraph.polyomino.org.uk> <20190814202102.GI31406@gate.crashing.org> <alpine.DEB.2.21.1908142022330.24610@digraph.polyomino.org.uk> <20190814210015.GJ31406@gate.crashing.org> <CACMrGjCcY_b4zDb2MprOCJa1Z3H-_1SdP+2XkCsf0ckeyY5A9w@mail.gmail.com> <mpta7cah9xo.fsf@arm.com>

> I think the code should instead be a fused addition and truncation, > a bit like FMA is a fused addition and multiplication. Describing it as > a DFmode addition followed by some conversion to SF would still involve > double rounding. In that case, something like FADD. But for functions like fsub, fmul and fdiv that does similar computation, wouldn't we need more operation codes for them? Is it possible to have something generalized that does *arithmetic computation (rather than just addition)* and then *conversion (narrowing)*? just a thought. Thanks, Tejas On Thu, 15 Aug 2019 at 18:17, Richard Sandiford <richard.sandiford@arm.com> wrote: > > Tejas Joshi <tejasjoshi9673@gmail.com> writes: > > Hello. > > I just wanted to make sure that I am looking at the correct code here. > > Except for rtl.def where I should be introducing something like > > float_contract (or float_narrow?) and also simplify-rtx.c, breakpoints > > set on functions around expr.c, cfgexpand.c where I grep for > > float_truncate/FLOAT_TRUNCATE did not hit. > > Also, in what manner should float_contract/narrow be different from > > float_truncate as both are trying to do similar things? (truncation > > from DF to SF) > > I think the code should instead be a fused addition and truncation, > a bit like FMA is a fused addition and multiplication. Describing it as > a DFmode addition followed by some conversion to SF would still involve > double rounding. > > simplify-rtx.c is probably the most important place to handle it. > It would be easiest to test using the selftests at the end of the file. > > Thanks, > Richard

**References**:**Re: Expansion of narrowing math built-ins into power instructions***From:*Segher Boessenkool

**Re: Expansion of narrowing math built-ins into power instructions***From:*Tejas Joshi

**Re: Expansion of narrowing math built-ins into power instructions***From:*Segher Boessenkool

**Re: Expansion of narrowing math built-ins into power instructions***From:*Joseph Myers

**Re: Expansion of narrowing math built-ins into power instructions***From:*Segher Boessenkool

**Re: Expansion of narrowing math built-ins into power instructions***From:*Tejas Joshi

**Re: Expansion of narrowing math built-ins into power instructions***From:*Segher Boessenkool

**Re: Expansion of narrowing math built-ins into power instructions***From:*Joseph Myers

**Re: Expansion of narrowing math built-ins into power instructions***From:*Segher Boessenkool

**Re: Expansion of narrowing math built-ins into power instructions***From:*Joseph Myers

**Re: Expansion of narrowing math built-ins into power instructions***From:*Segher Boessenkool

**Re: Expansion of narrowing math built-ins into power instructions***From:*Tejas Joshi

**Re: Expansion of narrowing math built-ins into power instructions***From:*Richard Sandiford

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |