Re: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-10-31 Thread Jeff Law via Gcc-patches
On 10/31/22 05:42, Tamar Christina via Gcc-patches wrote: Hi, This is a cleaned up version addressing all feedback. Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * match.pd: Add new rule. gcc/tests

RE: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-10-31 Thread Tamar Christina via Gcc-patches
Hi, This is a cleaned up version addressing all feedback. Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * match.pd: Add new rule. gcc/testsuite/ChangeLog: * gcc.target/aarch64/if-compare_1.c:

RE: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-09-26 Thread Richard Biener via Gcc-patches
On Fri, 23 Sep 2022, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Friday, September 23, 2022 9:10 AM > > To: Tamar Christina > > Cc: Andrew Pinski ; nd ; gcc- > > patc...@gcc.gnu.org > > Subject: RE: [PATCH]

RE: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-09-23 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Friday, September 23, 2022 9:10 AM > To: Tamar Christina > Cc: Andrew Pinski ; nd ; gcc- > patc...@gcc.gnu.org > Subject: RE: [PATCH]middle-end simplify complex if expressions where > comparisons are inverse of

RE: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-09-23 Thread Richard Biener via Gcc-patches
On Fri, 23 Sep 2022, Tamar Christina wrote: > Hello, > > > where logical_inverted is somewhat contradicting using zero_one_valued > > instead of truth_valued_p (I think the former might not work for vector > > booleans?). > > > > In the end I'd prefer zero_one_valued_p but avoiding inverse_condi

RE: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-09-23 Thread Tamar Christina via Gcc-patches
Hello, > where logical_inverted is somewhat contradicting using zero_one_valued > instead of truth_valued_p (I think the former might not work for vector > booleans?). > > In the end I'd prefer zero_one_valued_p but avoiding inverse_conditions_p > would be nice. > > Richard. It's not pretty but

RE: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-07-08 Thread Richard Biener via Gcc-patches
; > Sent: Wednesday, July 6, 2022 3:10 AM > > > > To: Tamar Christina > > > > Cc: Richard Biener ; nd ; gcc- > > > > patc...@gcc.gnu.org > > > > Subject: Re: [PATCH]middle-end simplify complex if expressions where &

Re: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-07-07 Thread Jeff Law via Gcc-patches
On 7/5/2022 8:09 PM, Andrew Pinski via Gcc-patches wrote: Not your fault but there are now like two different predicates for a boolean like operand. zero_one_valued_p and truth_valued_p and a third way to describe it is to use SSA_NAME and check ssa_name_has_boolean_range. The latter is meant

RE: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-07-07 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Andrew Pinski > Sent: Wednesday, July 6, 2022 8:37 PM > To: Tamar Christina > Cc: Richard Biener ; nd ; gcc- > patc...@gcc.gnu.org > Subject: Re: [PATCH]middle-end simplify complex if expressions where > comparisons are inverse of

Re: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-07-06 Thread Andrew Pinski via Gcc-patches
--Original Message- > > > > From: Richard Biener > > > > Sent: Monday, June 20, 2022 9:57 AM > > > > To: Tamar Christina > > > > Cc: gcc-patches@gcc.gnu.org; nd > > > > Subject: Re: [PATCH]middle-end simplify complex if expressi

RE: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-07-06 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Andrew Pinski > Sent: Wednesday, July 6, 2022 3:10 AM > To: Tamar Christina > Cc: Richard Biener ; nd ; gcc- > patc...@gcc.gnu.org > Subject: Re: [PATCH]middle-end simplify complex if expressions where > comparisons are inverse of

Re: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-07-05 Thread Andrew Pinski via Gcc-patches
ct: Re: [PATCH]middle-end simplify complex if expressions where > > comparisons are inverse of one another. > > > > On Thu, 16 Jun 2022, Tamar Christina wrote: > > > > > Hi All, > > > > > > This optimizes the following sequence > > > > > &

RE: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-07-05 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Monday, June 20, 2022 9:57 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd > Subject: Re: [PATCH]middle-end simplify complex if expressions where > comparisons are inverse of one another. > >

Re: [PATCH]middle-end simplify complex if expressions where comparisons are inverse of one another.

2022-06-20 Thread Richard Biener via Gcc-patches
On Thu, 16 Jun 2022, Tamar Christina wrote: > Hi All, > > This optimizes the following sequence > > ((a < b) & c) | ((a >= b) & d) > > into > > (a < b ? c : d) & 1 > > for scalar. On vector we can omit the & 1. > > This changes the code generation from > > zoo2: > cmp w0, w1 >