On 2/17/23 07:02, Matevos Mehrabyan via Gcc-patches wrote:
Hi all,
If we have division and remainder calculations with the same operands:
a = b / c;
d = b % c;
We can replace the calculation of remainder with multiplication +
subtraction, using the result from the previous division:
On Mon, 20 Feb 2023, Alexander Monakov wrote:
> > > That's the kind of stuff I'd expect to happen at the tree level though,
> > > before expand.
> >
> > The GIMPLE pass forming divmod could indeed choose to emit the
> > div + mul/sub sequence instead if an actual divmod pattern isn't available.
On Mon, 20 Feb 2023, Richard Biener via Gcc-patches wrote:
> On Sun, Feb 19, 2023 at 2:15 AM Maciej W. Rozycki wrote:
> >
> > > The problem is you don't see it as a divmod in expand_divmod unless you
> > > expose
> > > a divmod optab. See tree-ssa-mathopts.cc's divmod handling.
> >
> > That'
On Sun, Feb 19, 2023 at 2:15 AM Maciej W. Rozycki wrote:
>
> On Sat, 18 Feb 2023, Jeff Law wrote:
>
> > > Barring the fusion case, which indeed asks for a dedicated `divmod'
> > > pattern (and then I suppose a post-reload splitter or a peephole so that
> > > where one of the two results produced
On Sat, Feb 18, 2023 at 1:30 PM Palmer Dabbelt wrote:
>
> On Sat, 18 Feb 2023 13:06:02 PST (-0800), jeffreya...@gmail.com wrote:
> >
> >
> > On 2/18/23 11:26, Palmer Dabbelt wrote:
> >> On Fri, 17 Feb 2023 06:02:40 PST (-0800), gcc-patches@gcc.gnu.org wrote:
> >>> Hi all,
> >>> If we have division
On Sat, 18 Feb 2023, Jeff Law wrote:
> > Barring the fusion case, which indeed asks for a dedicated `divmod'
> > pattern (and then I suppose a post-reload splitter or a peephole so that
> > where one of the two results produced has eventually turned out unused, we
> > have means to discard the u
On 2/18/23 14:30, Palmer Dabbelt wrote:
On Sat, 18 Feb 2023 13:06:02 PST (-0800), jeffreya...@gmail.com wrote:
On 2/18/23 11:26, Palmer Dabbelt wrote:
On Fri, 17 Feb 2023 06:02:40 PST (-0800), gcc-patches@gcc.gnu.org wrote:
Hi all,
If we have division and remainder calculations with the s
On Sat, 18 Feb 2023 13:06:02 PST (-0800), jeffreya...@gmail.com wrote:
On 2/18/23 11:26, Palmer Dabbelt wrote:
On Fri, 17 Feb 2023 06:02:40 PST (-0800), gcc-patches@gcc.gnu.org wrote:
Hi all,
If we have division and remainder calculations with the same operands:
a = b / c;
d = b % c;
We
On 2/18/23 12:31, Maciej W. Rozycki wrote:
On Sat, 18 Feb 2023, Andrew Pinski via Gcc-patches wrote:
If we have division and remainder calculations with the same operands:
a = b / c;
d = b % c;
We can replace the calculation of remainder with multiplication +
subtraction, using the r
On 2/18/23 11:26, Palmer Dabbelt wrote:
On Fri, 17 Feb 2023 06:02:40 PST (-0800), gcc-patches@gcc.gnu.org wrote:
Hi all,
If we have division and remainder calculations with the same operands:
a = b / c;
d = b % c;
We can replace the calculation of remainder with multiplication +
subtrac
On Sun, 19 Feb 2023 at 01:01, Maciej W. Rozycki wrote:
>
> On Sat, 18 Feb 2023, Andrew Pinski via Gcc-patches wrote:
>
> > > > If we have division and remainder calculations with the same operands:
> > > >
> > > > a = b / c;
> > > > d = b % c;
> > > >
> > > > We can replace the calculation of
On Sat, 18 Feb 2023, Andrew Pinski via Gcc-patches wrote:
> > > If we have division and remainder calculations with the same operands:
> > >
> > > a = b / c;
> > > d = b % c;
> > >
> > > We can replace the calculation of remainder with multiplication +
> > > subtraction, using the result from
On Sat, 18 Feb 2023 10:42:51 PST (-0800), pins...@gmail.com wrote:
On Sat, Feb 18, 2023 at 10:27 AM Palmer Dabbelt wrote:
On Fri, 17 Feb 2023 06:02:40 PST (-0800), gcc-patches@gcc.gnu.org wrote:
> Hi all,
> If we have division and remainder calculations with the same operands:
>
> a = b / c;
On Sat, Feb 18, 2023 at 10:27 AM Palmer Dabbelt wrote:
>
> On Fri, 17 Feb 2023 06:02:40 PST (-0800), gcc-patches@gcc.gnu.org wrote:
> > Hi all,
> > If we have division and remainder calculations with the same operands:
> >
> > a = b / c;
> > d = b % c;
> >
> > We can replace the calculation of
On Fri, 17 Feb 2023 06:02:40 PST (-0800), gcc-patches@gcc.gnu.org wrote:
Hi all,
If we have division and remainder calculations with the same operands:
a = b / c;
d = b % c;
We can replace the calculation of remainder with multiplication +
subtraction, using the result from the previous div
Hi all,
If we have division and remainder calculations with the same operands:
a = b / c;
d = b % c;
We can replace the calculation of remainder with multiplication +
subtraction, using the result from the previous division:
a = b / c;
d = a * c;
d = b - d;
Which will be faster.
Curre
16 matches
Mail list logo