Re: [PATCH] xtensa: Prevent emitting integer additions of constant zero

2022-08-17 Thread Max Filippov via Gcc-patches
On Wed, Aug 17, 2022 at 2:52 AM Takayuki 'January June' Suwa wrote: > As a matter of fact, "in a few cases" is just only one: > > [xtensa_expand_epilogue() in /gcc/config/xtensa/xtensa.cc] > > if (cfun->machine->current_frame_size > 0) > > { > > if (frame_pointer_needed || /* al

Re: [PATCH] xtensa: Prevent emitting integer additions of constant zero

2022-08-17 Thread Takayuki 'January June' Suwa via Gcc-patches
On 2022/08/17 4:58, Max Filippov wrote: > Hi Suwa-san, Hi! > > On Tue, Aug 16, 2022 at 5:42 AM Takayuki 'January June' Suwa > wrote: >> >> In a few cases, obviously omitable add instructions can be emitted via >> invoking gen_addsi3. >> >> gcc/ChangeLog: >> >> * config/xtensa/xtensa.md (

Re: [PATCH] xtensa: Prevent emitting integer additions of constant zero

2022-08-16 Thread Max Filippov via Gcc-patches
Hi Suwa-san, On Tue, Aug 16, 2022 at 5:42 AM Takayuki 'January June' Suwa wrote: > > In a few cases, obviously omitable add instructions can be emitted via > invoking gen_addsi3. > > gcc/ChangeLog: > > * config/xtensa/xtensa.md (addsi3_internal): Rename from "addsi3". > (addsi3):

[PATCH] xtensa: Prevent emitting integer additions of constant zero

2022-08-16 Thread Takayuki 'January June' Suwa via Gcc-patches
In a few cases, obviously omitable add instructions can be emitted via invoking gen_addsi3. gcc/ChangeLog: * config/xtensa/xtensa.md (addsi3_internal): Rename from "addsi3". (addsi3): New define_expand in order to reject integer additions of constant zero. --- gcc/config/