Re: [PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-12-05 Thread Richard Sandiford via Gcc-patches
Richard Sandiford via Gcc-patches writes: > Tamar Christina via Gcc-patches writes: >>> > +/* Check to see if the supplied comparison in PTEST can be performed as a >>> > + bit-test-and-branch instead. VAL must contain the original tree >>> > + expression of the non-zero operand which will

Re: [PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-12-05 Thread Richard Sandiford via Gcc-patches
Tamar Christina via Gcc-patches writes: >> > +/* Check to see if the supplied comparison in PTEST can be performed as a >> > + bit-test-and-branch instead. VAL must contain the original tree >> > + expression of the non-zero operand which will be used to rewrite the >> > + comparison in

RE: [PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-12-01 Thread Richard Biener via Gcc-patches
On Thu, 1 Dec 2022, Tamar Christina wrote: > > > +/* Check to see if the supplied comparison in PTEST can be performed as a > > > + bit-test-and-branch instead. VAL must contain the original tree > > > + expression of the non-zero operand which will be used to rewrite the > > > +

RE: [PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-12-01 Thread Tamar Christina via Gcc-patches
> > +/* Check to see if the supplied comparison in PTEST can be performed as a > > + bit-test-and-branch instead. VAL must contain the original tree > > + expression of the non-zero operand which will be used to rewrite the > > + comparison in PTEST. > > + > > + Returns TRUE if operation

Re: [PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-11-14 Thread Richard Biener via Gcc-patches
On Mon, Nov 14, 2022 at 4:57 PM Tamar Christina via Gcc-patches wrote: > > > -Original Message- > > From: Richard Biener > > Sent: Saturday, November 5, 2022 2:23 PM > > To: Aldy Hernandez > > Cc: Tamar Christina ; Jeff Law > > ; gcc-patches@gcc.gnu.org; nd ; > > MacLeod, Andrew > >

Re: [PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-11-14 Thread Jeff Law via Gcc-patches
On 11/14/22 08:56, Tamar Christina wrote: gcc/ChangeLog: * dojump.cc (do_jump): Pass along value. (do_jump_by_parts_greater_rtx): Likewise. (do_jump_by_parts_zero_rtx): Likewise. (do_jump_by_parts_equality_rtx): Likewise. (do_compare_rtx_and_jump):

RE: [PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-11-14 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Saturday, November 5, 2022 2:23 PM > To: Aldy Hernandez > Cc: Tamar Christina ; Jeff Law > ; gcc-patches@gcc.gnu.org; nd ; > MacLeod, Andrew > Subject: Re: [PATCH 1/2]middle-end: Add new tbranch optab to add support > for

Re: [PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-11-05 Thread Richard Biener via Gcc-patches
On Wed, 2 Nov 2022, Aldy Hernandez wrote: > On Wed, Nov 2, 2022 at 10:55 AM Tamar Christina > wrote: > > > > Hi Aldy, > > > > I'm trying to use Ranger to determine if a range of an expression is a > > single bit. > > > > If possible in case of a mask then also the position of the bit that's >

Re: [PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-11-02 Thread Aldy Hernandez via Gcc-patches
On Wed, Nov 2, 2022 at 10:55 AM Tamar Christina wrote: > > Hi Aldy, > > I'm trying to use Ranger to determine if a range of an expression is a single > bit. > > If possible in case of a mask then also the position of the bit that's being > checked by the mask (or the mask itself). Just

RE: [PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-11-02 Thread Tamar Christina via Gcc-patches
Hi Aldy, I'm trying to use Ranger to determine if a range of an expression is a single bit. If possible in case of a mask then also the position of the bit that's being checked by the mask (or the mask itself). Do you have any pointers/existing code I can look at to do this? Kind regards,

Re: [PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-11-01 Thread Jeff Law via Gcc-patches
On 11/1/22 09:53, Tamar Christina wrote: from the machine description. +@cindex @code{tbranch@var{mode}4} instruction pattern @item +@samp{tbranch@var{mode}4} Conditional branch instruction combined +with a bit test-and-compare instruction. Operand 0 is a comparison +operator. Operand 1

RE: [PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-11-01 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Jeff Law > Sent: Monday, October 31, 2022 9:16 PM > To: Tamar Christina ; gcc-patches@gcc.gnu.org > Cc: nd ; rguent...@suse.de > Subject: Re: [PATCH 1/2]middle-end: Add new tbranch optab to add support > for bit-test-and-branch operations > > > On 10/31/22

Re: [PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-10-31 Thread Jeff Law via Gcc-patches
On 10/31/22 05:53, Tamar Christina wrote: Hi All, This adds a new test-and-branch optab that can be used to do a conditional test of a bit and branch. This is similar to the cbranch optab but instead can test any arbitrary bit inside the register. This patch recognizes boolean comparisons

[PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-10-31 Thread Tamar Christina via Gcc-patches
Hi All, This adds a new test-and-branch optab that can be used to do a conditional test of a bit and branch. This is similar to the cbranch optab but instead can test any arbitrary bit inside the register. This patch recognizes boolean comparisons and single bit mask tests. Bootstrapped