Re: [RFC] Feedback on approach for adding support for V8QI->V8HI widening patterns

2021-02-03 Thread Joel Hutton via Gcc-patches
> Do you mean a v8qi->v8hi widening subtract or a v16qi->v8hi widening > subtract? I mean the latter, that seemed to be what richi was suggesting previously. > The problem with the latter is that we need to fill the > extra unused elements with something and remove them later. That's fair eno

Re: [RFC] Feedback on approach for adding support for V8QI->V8HI widening patterns

2021-02-03 Thread Richard Sandiford via Gcc-patches
Joel Hutton writes: >>> So emit a v4qi->v8qi gimple conversion >>> then a regular widen_lo/hi using the existing backend patterns/optabs? >> >>I was thinking of using a v8qi->v8hi convert on each operand followed >>by a normal v8hi subtraction. That's what we'd generate if the target >>didn't def

Re: [RFC] Feedback on approach for adding support for V8QI->V8HI widening patterns

2021-02-03 Thread Joel Hutton via Gcc-patches
>> So emit a v4qi->v8qi gimple conversion >> then a regular widen_lo/hi using the existing backend patterns/optabs? > >I was thinking of using a v8qi->v8hi convert on each operand followed >by a normal v8hi subtraction. That's what we'd generate if the target >didn't define the widening patterns.

Re: [RFC] Feedback on approach for adding support for V8QI->V8HI widening patterns

2021-02-03 Thread Richard Sandiford via Gcc-patches
Joel Hutton writes: In practice this will only affect targets that choose to use mixed vector sizes, and I think it's reasonable to optimise only for the case in which such targets support widening conversions. So what do you think about the idea of emitting separate conversio

Re: [RFC] Feedback on approach for adding support for V8QI->V8HI widening patterns

2021-02-03 Thread Joel Hutton via Gcc-patches
>>> In practice this will only affect targets that choose to use mixed >>> vector sizes, and I think it's reasonable to optimise only for the >>> case in which such targets support widening conversions. So what >>> do you think about the idea of emitting separate conversions and >>> a normal subtr

Re: [RFC] Feedback on approach for adding support for V8QI->V8HI widening patterns

2021-02-03 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Tue, Feb 2, 2021 at 5:19 PM Richard Sandiford > wrote: >> >> Richard Biener writes: >> > On Tue, Feb 2, 2021 at 4:03 PM Richard Sandiford >> > wrote: >> >> >> >> Richard Biener writes: >> >> > On Mon, Feb 1, 2021 at 6:54 PM Joel Hutton wrote: >> >> >> >> >> >> Hi R

Re: [RFC] Feedback on approach for adding support for V8QI->V8HI widening patterns

2021-02-03 Thread Richard Biener via Gcc-patches
On Tue, Feb 2, 2021 at 5:19 PM Richard Sandiford wrote: > > Richard Biener writes: > > On Tue, Feb 2, 2021 at 4:03 PM Richard Sandiford > > wrote: > >> > >> Richard Biener writes: > >> > On Mon, Feb 1, 2021 at 6:54 PM Joel Hutton wrote: > >> >> > >> >> Hi Richard(s), > >> >> > >> >> I'm just l

Re: [RFC] Feedback on approach for adding support for V8QI->V8HI widening patterns

2021-02-02 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Tue, Feb 2, 2021 at 4:03 PM Richard Sandiford > wrote: >> >> Richard Biener writes: >> > On Mon, Feb 1, 2021 at 6:54 PM Joel Hutton wrote: >> >> >> >> Hi Richard(s), >> >> >> >> I'm just looking to see if I'm going about this the right way, based on >> >> the discus

Re: [RFC] Feedback on approach for adding support for V8QI->V8HI widening patterns

2021-02-02 Thread Richard Biener via Gcc-patches
On Tue, Feb 2, 2021 at 4:03 PM Richard Sandiford wrote: > > Richard Biener writes: > > On Mon, Feb 1, 2021 at 6:54 PM Joel Hutton wrote: > >> > >> Hi Richard(s), > >> > >> I'm just looking to see if I'm going about this the right way, based on > >> the discussion we had on IRC. I've managed to

Re: [RFC] Feedback on approach for adding support for V8QI->V8HI widening patterns

2021-02-02 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Mon, Feb 1, 2021 at 6:54 PM Joel Hutton wrote: >> >> Hi Richard(s), >> >> I'm just looking to see if I'm going about this the right way, based on the >> discussion we had on IRC. I've managed to hack something together, I've >> attached a (very) WIP patch which gives

Re: [RFC] Feedback on approach for adding support for V8QI->V8HI widening patterns

2021-02-02 Thread Richard Biener via Gcc-patches
On Mon, Feb 1, 2021 at 6:54 PM Joel Hutton wrote: > > Hi Richard(s), > > I'm just looking to see if I'm going about this the right way, based on the > discussion we had on IRC. I've managed to hack something together, I've > attached a (very) WIP patch which gives the correct codegen for the tes

[RFC] Feedback on approach for adding support for V8QI->V8HI widening patterns

2021-02-01 Thread Joel Hutton via Gcc-patches
Hi Richard(s), I'm just looking to see if I'm going about this the right way, based on the discussion we had on IRC. I've managed to hack something together, I've attached a (very) WIP patch which gives the correct codegen for the testcase in question (https://gcc.gnu.org/bugzilla/show_bug.cgi?