Re: [PATCH v1 3/3] RISC-V: Replace zero_extendsidi2_shifted with generalized split

2022-06-07 Thread Kito Cheng via Gcc-patches
Using the same pseudo register makes one longer live range instead of two shorter live ranges, that's not good when inst. scheduler try to separate those two instructions, and I think register allocator has more complete knowledge to decide which way is better - using the same or different, so I pr

Re: [PATCH v1 3/3] RISC-V: Replace zero_extendsidi2_shifted with generalized split

2022-06-07 Thread Philipp Tomsich
On Tue, 7 Jun 2022 at 12:24, Kito Cheng wrote: > > On Wed, May 25, 2022 at 5:47 AM Philipp Tomsich > wrote: > > > > The current method of treating shifts of extended values on RISC-V > > frequently causes sequences of 3 shifts, despite the presence of the > > 'zero_extendsidi2_shifted' pattern. >

Re: [PATCH v1 3/3] RISC-V: Replace zero_extendsidi2_shifted with generalized split

2022-06-07 Thread Kito Cheng via Gcc-patches
On Wed, May 25, 2022 at 5:47 AM Philipp Tomsich wrote: > > The current method of treating shifts of extended values on RISC-V > frequently causes sequences of 3 shifts, despite the presence of the > 'zero_extendsidi2_shifted' pattern. > > Consider: > unsigned long f(unsigned int a, unsigned lo

[PATCH v1 3/3] RISC-V: Replace zero_extendsidi2_shifted with generalized split

2022-05-24 Thread Philipp Tomsich
The current method of treating shifts of extended values on RISC-V frequently causes sequences of 3 shifts, despite the presence of the 'zero_extendsidi2_shifted' pattern. Consider: unsigned long f(unsigned int a, unsigned long b) { a = a << 1; unsigned long c = (un