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

2025-06-09 Thread Segher Boessenkool
On Mon, Jun 09, 2025 at 08:26:10AM -0600, Jeff Law wrote: > On 4/1/25 9:35 PM, Jeff Law wrote: > So returning to this > > So the combine pass doesn't reject combination into an ASM_INPUT, just > combination from most ASM_INPUTs. Yeah, exactly. > It does rely on predicates to determine valid

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

2025-06-09 Thread Segher Boessenkool
Hi! On Tue, Apr 01, 2025 at 09:35:53PM -0600, Jeff Law wrote: > Segher -- there's a combine question near the end... > So this is a nasty little problem and touches on a deeper issue. > > The core problem is that combine doesn't know anything about > constraints. It works with predicates and c

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

2025-06-09 Thread Jeff Law
On 4/1/25 9:35 PM, Jeff Law wrote: 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 t

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