Re: [PATCH] vect: while_ult for integer mask

2022-10-03 Thread Andrew Stubbs
On 29/09/2022 14:46, Richard Biener wrote: It's not the nicest way of carrying the information but short of inventing new modes I can't see something better (well, another optab). I see the GCN backend expects a constant in operand 3 but the docs don't specify the operand has to be a CONST_INT,

Re: [PATCH] vect: while_ult for integer mask

2022-09-29 Thread Richard Biener via Gcc-patches
On Thu, Sep 29, 2022 at 12:17 PM Richard Sandiford wrote: > > Andrew Stubbs writes: > > On 29/09/2022 10:24, Richard Sandiford wrote: > >> Otherwise: > >> > >>operand0[0] = operand1 < operand2; > >>for (i = 1; i < operand3; i++) > >> operand0[i] = operand0[i - 1] && (operand1 + i < o

Re: [PATCH] vect: while_ult for integer mask

2022-09-29 Thread Richard Sandiford via Gcc-patches
Andrew Stubbs writes: > On 29/09/2022 10:24, Richard Sandiford wrote: >> Otherwise: >> >>operand0[0] = operand1 < operand2; >>for (i = 1; i < operand3; i++) >> operand0[i] = operand0[i - 1] && (operand1 + i < operand2); >> >> looks like a "length and mask" operation, which IIUC is a

Re: [PATCH] vect: while_ult for integer mask

2022-09-29 Thread Andrew Stubbs
On 29/09/2022 10:24, Richard Sandiford wrote: Otherwise: operand0[0] = operand1 < operand2; for (i = 1; i < operand3; i++) operand0[i] = operand0[i - 1] && (operand1 + i < operand2); looks like a "length and mask" operation, which IIUC is also what RVV wanted? (Wasn't at the Cauldro

Re: [PATCH] vect: while_ult for integer mask

2022-09-29 Thread Andrew Stubbs
On 29/09/2022 08:52, Richard Biener wrote: On Wed, Sep 28, 2022 at 5:06 PM Andrew Stubbs wrote: This patch is a prerequisite for some amdgcn patches I'm working on to support shorter vector lengths (having fixed 64 lanes tends to miss optimizations, and masking is not supported everywhere yet)

Re: Re: [PATCH] vect: while_ult for integer mask

2022-09-29 Thread juzhe.zh...@rivai.ai
to exit the loop) if (TVL ==0) exit loop .. juzhe.zh...@rivai.ai From: Richard Sandiford Date: 2022-09-29 17:24 To: Richard Biener via Gcc-patches CC: Andrew Stubbs; Richard Biener; juzhe.zhong Subject: Re: [PATCH] vect: while_ult for integer mask Richard Biener via Gcc-patches writes:

Re: [PATCH] vect: while_ult for integer mask

2022-09-29 Thread Richard Biener via Gcc-patches
On Thu, Sep 29, 2022 at 11:24 AM Richard Sandiford wrote: > > Richard Biener via Gcc-patches writes: > > On Wed, Sep 28, 2022 at 5:06 PM Andrew Stubbs wrote: > >> > >> This patch is a prerequisite for some amdgcn patches I'm working on to > >> support shorter vector lengths (having fixed 64 lane

Re: [PATCH] vect: while_ult for integer mask

2022-09-29 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Wed, Sep 28, 2022 at 5:06 PM Andrew Stubbs wrote: >> >> This patch is a prerequisite for some amdgcn patches I'm working on to >> support shorter vector lengths (having fixed 64 lanes tends to miss >> optimizations, and masking is not supported everywhe

Re: [PATCH] vect: while_ult for integer mask

2022-09-29 Thread Richard Biener via Gcc-patches
On Wed, Sep 28, 2022 at 5:06 PM Andrew Stubbs wrote: > > This patch is a prerequisite for some amdgcn patches I'm working on to > support shorter vector lengths (having fixed 64 lanes tends to miss > optimizations, and masking is not supported everywhere yet). > > The problem is that, unlike AArch

[PATCH] vect: while_ult for integer mask

2022-09-28 Thread Andrew Stubbs
This patch is a prerequisite for some amdgcn patches I'm working on to support shorter vector lengths (having fixed 64 lanes tends to miss optimizations, and masking is not supported everywhere yet). The problem is that, unlike AArch64, I'm not using different mask modes for different sized ve