RE: [EXTERNAL] Re: [PATCH] [tree-optimization] Optimize two patterns with three xors.

2020-11-19 Thread Eugene Rozenfeld via Gcc-patches
ovember 18, 2020 11:33 AM To: Richard Biener ; Eugene Rozenfeld Cc: gcc-patches@gcc.gnu.org Subject: [EXTERNAL] Re: [PATCH] [tree-optimization] Optimize two patterns with three xors. On 11/17/20 12:57 AM, Richard Biener via Gcc-patches wrote: > On Tue, Nov 17, 2020 at 3:19 AM Eugene Rozenf

Re: [PATCH] [tree-optimization] Optimize two patterns with three xors.

2020-11-18 Thread Jeff Law via Gcc-patches
On 11/17/20 12:57 AM, Richard Biener via Gcc-patches wrote: > On Tue, Nov 17, 2020 at 3:19 AM Eugene Rozenfeld > wrote: >> Thank you for the review Richard! >> >> I re-worked the patch based on your suggestions (attached). >> I made the change to reuse the first bit_xor in both patterns and I a

Re: [PATCH] [tree-optimization] Optimize two patterns with three xors.

2020-11-16 Thread Richard Biener via Gcc-patches
x27;s correct. The patch is OK. Thanks, Richard. > Eugene > > -Original Message- > From: Richard Biener > Sent: Monday, November 16, 2020 4:11 AM > To: Eugene Rozenfeld > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] [tree-optimization] Optimize two pattern

Re: [PATCH] [tree-optimization] Optimize two patterns with three xors.

2020-11-16 Thread Eugene Rozenfeld via Gcc-patches
: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] [tree-optimization] Optimize two patterns with three xors. On Thu, Nov 12, 2020 at 2:53 AM Eugene Rozenfeld via Gcc-patches wrote: > > Simplify (a ^ b) & ((b ^ c) ^ a) --> (a ^ b) & ~c. > > int f(int a, int b, int c) > { >

Re: [PATCH] [tree-optimization] Optimize two patterns with three xors.

2020-11-16 Thread Richard Biener via Gcc-patches
On Thu, Nov 12, 2020 at 2:53 AM Eugene Rozenfeld via Gcc-patches wrote: > > Simplify (a ^ b) & ((b ^ c) ^ a) --> (a ^ b) & ~c. > > int f(int a, int b, int c) > { > return (a ^ b) & ((b ^ c) ^ a); > } > > Code without the patch: > moveax,edx > xoreax,esi > xoreax,edi > xoredi,es

[PATCH] [tree-optimization] Optimize two patterns with three xors.

2020-11-11 Thread Eugene Rozenfeld via Gcc-patches
Simplify (a ^ b) & ((b ^ c) ^ a) --> (a ^ b) & ~c. int f(int a, int b, int c) { return (a ^ b) & ((b ^ c) ^ a); } Code without the patch: moveax,edx xoreax,esi xoreax,edi xoredi,esi andeax,edi ret Code with the patch: xoredi,esi andn eax,edx,edi ret Simplify (a