Re: [PATCH] RISC-V: xtheadmemidx: Split slli.uw pattern [combine question]

2025-04-05 Thread Christoph Müllner
On Wed, Apr 2, 2025 at 5:35 AM Jeff Law wrote: > > > Segher -- there's a combine question near the end... I've created PR119587 to keep track of this issue. BR Christoph > > > On 3/23/25 8:43 PM, Bohan Lei wrote: > > The combine pass can generate an index like (and:DI (mult:DI (reg:DI) > > (con

Re: [PATCH] RISC-V: xtheadmemidx: Split slli.uw pattern [combine question]

2025-04-01 Thread Jeff Law
Segher -- there's a combine question near the end... On 3/23/25 8:43 PM, Bohan Lei wrote: The combine pass can generate an index like (and:DI (mult:DI (reg:DI) (const_int scale)) (const_int mask)) when XTheadMemIdx is available. LRA may pull it out, and thus a splitter is needed when Zba is n

Re: [PATCH] RISC-V: xtheadmemidx: Split slli.uw pattern

2025-04-01 Thread Jeff Law
On 3/30/25 8:54 PM, Bohan Lei wrote: The RTL pattern has an "and" operation, which clears out the upper bits after the shift operation. Since we have (INTVAL (operands[3]) >> INTVAL (operands[2])) == 0x as a constraint, the RTL template and the split code should be semantically identi

Re: [PATCH] RISC-V: xtheadmemidx: Split slli.uw pattern

2025-03-30 Thread Bohan Lei
patches" CC:"christoph.muellner" Subject:Re: [PATCH] RISC-V: xtheadmemidx: Split slli.uw pattern On 3/23/25 8:43 PM, Bohan Lei wrote: > The combine pass can generate an index like (and:DI (mult:DI (reg:DI) > (const_int scale)) (const_int mask)) when XTheadMemIdx is avai

Re: [PATCH] RISC-V: xtheadmemidx: Split slli.uw pattern

2025-03-30 Thread Jeff Law
On 3/23/25 8:43 PM, Bohan Lei wrote: The combine pass can generate an index like (and:DI (mult:DI (reg:DI) (const_int scale)) (const_int mask)) when XTheadMemIdx is available. LRA may pull it out, and thus a splitter is needed when Zba is not available. A similar splitter were introduced when

Re: [PATCH] RISC-V: xtheadmemidx: Split slli.uw pattern

2025-03-24 Thread Christoph Müllner
On Mon, Mar 24, 2025 at 3:44 AM Bohan Lei wrote: > > The combine pass can generate an index like (and:DI (mult:DI (reg:DI) > (const_int scale)) (const_int mask)) when XTheadMemIdx is available. > LRA may pull it out, and thus a splitter is needed when Zba is not > available. > > A similar splitter

[PATCH] RISC-V: xtheadmemidx: Split slli.uw pattern

2025-03-23 Thread Bohan Lei
The combine pass can generate an index like (and:DI (mult:DI (reg:DI) (const_int scale)) (const_int mask)) when XTheadMemIdx is available. LRA may pull it out, and thus a splitter is needed when Zba is not available. A similar splitter were introduced when XTheadMemIdx support was added, but remov