On Wed, 3 Nov 2021, Tamar Christina wrote:
> Hi,
>
> I have addressed all the feedback and updated patch attached:
>
> Bootstrapped Regtested on aarch64-none-linux-gnu,
> x86_64-pc-linux-gnu and no regressions.
>
> Ok for master?
>
> Thanks,
> Tamar
>
> gcc/ChangeLog:
>
> * match.pd: N
Hi,
I have addressed all the feedback and updated patch attached:
Bootstrapped Regtested on aarch64-none-linux-gnu,
x86_64-pc-linux-gnu and no regressions.
Ok for master?
Thanks,
Tamar
gcc/ChangeLog:
* match.pd: New negate+shift pattern.
gcc/testsuite/ChangeLog:
* gcc.dg/sig
> -Original Message-
> From: Richard Biener
> Sent: Friday, October 15, 2021 10:07 AM
> To: Tamar Christina
> Cc: Richard Earnshaw ; gcc-
> patc...@gcc.gnu.org; nd
> Subject: RE: [PATCH]middle-end convert negate + right shift into compare
> greater.
>
&
On Fri, 15 Oct 2021, Richard Earnshaw wrote:
> On 15/10/2021 10:06, Richard Biener via Gcc-patches wrote:
> > On Fri, 15 Oct 2021, Tamar Christina wrote:
> >
>
> +/* Fold (-x >> C) into x > 0 where C = precision(type) - 1. */ (for
> +cst (INTEGER_CST VECTOR_CST) (simplify
>
On 15/10/2021 10:06, Richard Biener via Gcc-patches wrote:
On Fri, 15 Oct 2021, Tamar Christina wrote:
+/* Fold (-x >> C) into x > 0 where C = precision(type) - 1. */ (for
+cst (INTEGER_CST VECTOR_CST) (simplify
+ (rshift (negate:s @0) cst@1)
+ (if (!flag_wrapv)
Don't test flag_wrapv di
On Fri, 15 Oct 2021, Tamar Christina wrote:
> > >
> > > +/* Fold (-x >> C) into x > 0 where C = precision(type) - 1. */ (for
> > > +cst (INTEGER_CST VECTOR_CST) (simplify
> > > + (rshift (negate:s @0) cst@1)
> > > + (if (!flag_wrapv)
> >
> > Don't test flag_wrapv directly, instead use the ap
> >
> > +/* Fold (-x >> C) into x > 0 where C = precision(type) - 1. */ (for
> > +cst (INTEGER_CST VECTOR_CST) (simplify
> > + (rshift (negate:s @0) cst@1)
> > + (if (!flag_wrapv)
>
> Don't test flag_wrapv directly, instead use the appropriate
> TYPE_OVERFLOW_{UNDEFINED,WRAPS} predicates. Bu
On Mon, 11 Oct 2021, Tamar Christina wrote:
> Hi all,
>
> Here's a new version of the patch.
>
> > >>> " If an exceptional condition occurs during the evaluation of an
> > >>> expression
> > >> (that is, if the result is not mathematically defined or not in the
> > >> range of representable valu
Hi all,
Here's a new version of the patch.
> >>> " If an exceptional condition occurs during the evaluation of an
> >>> expression
> >> (that is, if the result is not mathematically defined or not in the
> >> range of representable values for its type), the behavior is undefined."
> >>>
> >>> So
compare
greater.
On 05/10/2021 14:49, Tamar Christina wrote:
-Original Message-
From: Richard Earnshaw
Sent: Tuesday, October 5, 2021 2:34 PM
To: Tamar Christina ;
gcc-patches@gcc.gnu.org
Cc: nd ; rguent...@suse.de
Subject: Re: [PATCH]middle-end convert negate + right shift into
compare
> -Original Message-
> From: Richard Earnshaw
> Sent: Tuesday, October 5, 2021 2:52 PM
> To: Tamar Christina ; gcc-patches@gcc.gnu.org
> Cc: nd ; rguent...@suse.de
> Subject: Re: [PATCH]middle-end convert negate + right shift into compare
> greater.
>
>
>
On 05/10/2021 14:49, Tamar Christina wrote:
-Original Message-
From: Richard Earnshaw
Sent: Tuesday, October 5, 2021 2:34 PM
To: Tamar Christina ; gcc-patches@gcc.gnu.org
Cc: nd ; rguent...@suse.de
Subject: Re: [PATCH]middle-end convert negate + right shift into compare
greater
> -Original Message-
> From: Richard Earnshaw
> Sent: Tuesday, October 5, 2021 2:34 PM
> To: Tamar Christina ; gcc-patches@gcc.gnu.org
> Cc: nd ; rguent...@suse.de
> Subject: Re: [PATCH]middle-end convert negate + right shift into compare
> greater.
>
>
>
On 05/10/2021 14:30, Tamar Christina wrote:
-Original Message-
From: Richard Earnshaw
Sent: Tuesday, October 5, 2021 1:56 PM
To: Tamar Christina ; gcc-patches@gcc.gnu.org
Cc: nd ; rguent...@suse.de
Subject: Re: [PATCH]middle-end convert negate + right shift into compare
greater
> -Original Message-
> From: Richard Earnshaw
> Sent: Tuesday, October 5, 2021 1:56 PM
> To: Tamar Christina ; gcc-patches@gcc.gnu.org
> Cc: nd ; rguent...@suse.de
> Subject: Re: [PATCH]middle-end convert negate + right shift into compare
> greater.
>
>
>
On 05/10/2021 13:50, Tamar Christina via Gcc-patches wrote:
Hi All,
This turns an inversion of the sign bit + arithmetic right shift into a
comparison with 0.
i.e.
void fun1(int32_t *x, int n)
{
for (int i = 0; i < (n & -16); i++)
x[i] = (-x[i]) >> 31;
}
Notwithstanding that I
16 matches
Mail list logo