Re: [PATCH v2 4/4] RISC-V: Cover sign-extensions in lshr3_zero_extend_4

2024-05-08 Thread Christoph Müllner
On Wed, May 8, 2024 at 3:48 PM Jeff Law wrote: > > > > On 5/8/24 1:36 AM, Christoph Müllner wrote: > > The lshr3_zero_extend_4 pattern targets bit extraction > > with zero-extension. This pattern represents the canonical form > > of zero-extensions of a logical right shift. > > > > The same

Re: [PATCH v2 4/4] RISC-V: Cover sign-extensions in lshr3_zero_extend_4

2024-05-08 Thread Jeff Law
On 5/8/24 1:36 AM, Christoph Müllner wrote: The lshr3_zero_extend_4 pattern targets bit extraction with zero-extension. This pattern represents the canonical form of zero-extensions of a logical right shift. The same optimization can be applied to sign-extensions. Given the two optimizations

[PATCH v2 4/4] RISC-V: Cover sign-extensions in lshr3_zero_extend_4

2024-05-08 Thread Christoph Müllner
The lshr3_zero_extend_4 pattern targets bit extraction with zero-extension. This pattern represents the canonical form of zero-extensions of a logical right shift. The same optimization can be applied to sign-extensions. Given the two optimizations are so similar, this patch converts the existing