PING: RE: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-06-02 Thread Yangfei (Felix)
Gentle ping ... > -Original Message- > From: Yangfei (Felix) > Sent: Wednesday, May 27, 2020 11:52 AM > To: 'Segher Boessenkool' > Cc: gcc-patches@gcc.gnu.org; Zhanghaijian (A) > Subject: RE: [PATCH PR94026] combine missed opportunity to simplify > comparis

RE: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-05-26 Thread Yangfei (Felix)
Hi, > -Original Message- > From: Segher Boessenkool [mailto:seg...@kernel.crashing.org] > Sent: Tuesday, May 26, 2020 11:32 PM > To: Yangfei (Felix) > Cc: gcc-patches@gcc.gnu.org; Zhanghaijian (A) > Subject: Re: [PATCH PR94026] combine missed opportunity to simp

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-05-26 Thread Segher Boessenkool
Hi! On Tue, May 26, 2020 at 03:45:05AM +, Yangfei (Felix) wrote: > > > I am using Outlook and I didn't find the place to change the MIME type > > > : - ( > > > > The simplest option is to use a different email client, one that plays > > nicely > > with others. You use git, maybe you could

RE: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-05-25 Thread Yangfei (Felix)
2001 > > From: Fei Yang > > Date: Mon, 25 May 2020 10:19:30 +0800 > > Subject: [PATCH] combine: missed opportunity to simplify comparisons > > with zero [PR94026] > > (Capital "M" on "Missed" please) > > But, the subject should say

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-05-25 Thread Segher Boessenkool
dff90ed Mon Sep 17 00:00:00 2001 > From: Fei Yang > Date: Mon, 25 May 2020 10:19:30 +0800 > Subject: [PATCH] combine: missed opportunity to simplify comparisons with zero > [PR94026] (Capital "M" on "Missed" please) But, the subject should say what the patch *does*.

RE: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-05-24 Thread Yangfei (Felix)
Hi, > -Original Message- > From: Segher Boessenkool [mailto:seg...@kernel.crashing.org] > Sent: Saturday, May 23, 2020 10:57 PM > To: Yangfei (Felix) > Cc: gcc-patches@gcc.gnu.org; Zhanghaijian (A) > Subject: Re: [PATCH PR94026] combine missed opportunity to simp

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-05-23 Thread Segher Boessenkool
Hi! Sorry this is taking so long. On Wed, May 06, 2020 at 08:57:52AM +, Yangfei (Felix) wrote: > > On Tue, Mar 24, 2020 at 06:30:12AM +, Yangfei (Felix) wrote: > > > I modified combine emitting a simple AND operation instead of making one > > zero_extract for this scenario. > > >

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-05-07 Thread Segher Boessenkool
Hi! On Wed, May 06, 2020 at 08:57:52AM +, Yangfei (Felix) wrote: > > This looks promising. I'll try it out, see what it does on other targets. > > (It will > > have to wait for GCC 11 stage 1, of course). > > I see GCC11 stage 1 opens for commits now. > I have rebased the patch on the

RE: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-05-06 Thread Yangfei (Felix)
Hi, > -Original Message- > From: Segher Boessenkool [mailto:seg...@kernel.crashing.org] > Sent: Tuesday, March 24, 2020 10:58 PM > To: Yangfei (Felix) > Cc: gcc-patches@gcc.gnu.org; Zhanghaijian (A) > Subject: Re: [PATCH PR94026] combine missed opportunity to simp

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-24 Thread Segher Boessenkool
On Tue, Mar 24, 2020 at 06:30:12AM +, Yangfei (Felix) wrote: > I modified combine emitting a simple AND operation instead of making one > zero_extract for this scenario. > Attached please find the new patch. Hope this solves both of our concerns. This looks promising. I'll try it out,

RE: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-24 Thread Yangfei (Felix)
Hi! > -Original Message- > From: Segher Boessenkool [mailto:seg...@kernel.crashing.org] > Sent: Monday, March 23, 2020 8:10 PM > To: Yangfei (Felix) > Cc: gcc-patches@gcc.gnu.org; Zhanghaijian (A) > Subject: Re: [PATCH PR94026] combine missed opportunity to simp

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-23 Thread Segher Boessenkool
On Mon, Mar 23, 2020 at 07:46:17AM +, Yangfei (Felix) wrote: > I think the problem here is how to make sure we are doing a ***equality*** > comparison with zero. > We can only do the transformation under this condition. > Then I see combine tries the following pattern: > > 173 Failed to

RE: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-23 Thread Yangfei (Felix)
> -Original Message- > From: Segher Boessenkool [mailto:seg...@kernel.crashing.org] > Sent: Friday, March 20, 2020 9:38 AM > To: Yangfei (Felix) > Cc: gcc-patches@gcc.gnu.org; Zhanghaijian (A) > Subject: Re: [PATCH PR94026] combine missed opportunity to simplify >

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-19 Thread Segher Boessenkool
On Thu, Mar 19, 2020 at 01:43:40AM +, Yangfei (Felix) wrote: > 2. Given that the patterns for ubfx and ubfiz are already not simple, I am > afraid the pattern we got by combining the three would be much complex. > And even more complex when further merged with insn 14 here in order to >

RE: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-18 Thread Yangfei (Felix)
Hi, > -Original Message- > From: Segher Boessenkool [mailto:seg...@kernel.crashing.org] > Sent: Thursday, March 19, 2020 7:52 AM > To: Yangfei (Felix) > Cc: gcc-patches@gcc.gnu.org; Zhanghaijian (A) > Subject: Re: [PATCH PR94026] combine missed opportunity to simp

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-18 Thread Segher Boessenkool
Hi! On Tue, Mar 17, 2020 at 02:05:19AM +, Yangfei (Felix) wrote: > > Trying 7 -> 8: > > 7: r99:SI=r103:SI>>0x8 > > REG_DEAD r103:SI > > 8: r100:SI=r99:SI&0x6 > > REG_DEAD r99:SI > > Failed to match this instruction: > > (set (reg:SI 100) > > (and:SI (lshiftrt:SI

RE: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-16 Thread Yangfei (Felix)
Hi, > -Original Message- > From: Segher Boessenkool [mailto:seg...@kernel.crashing.org] > Sent: Tuesday, March 17, 2020 1:58 AM > To: Yangfei (Felix) > Cc: gcc-patches@gcc.gnu.org; Zhanghaijian (A) > Subject: Re: [PATCH PR94026] combine missed opportunity to simp

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-16 Thread Segher Boessenkool
On Mon, Mar 16, 2020 at 06:29:39AM +, Yangfei (Felix) wrote: > Sorry for not getting your point here. Trying 7 -> 8: 7: r99:SI=r103:SI>>0x8 REG_DEAD r103:SI 8: r100:SI=r99:SI&0x6 REG_DEAD r99:SI Failed to match this instruction: (set (reg:SI 100) (and:SI (lshiftrt:SI

RE: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-16 Thread Yangfei (Felix)
Hi, > -Original Message- > From: Segher Boessenkool [mailto:seg...@kernel.crashing.org] > Sent: Saturday, March 14, 2020 12:07 AM > To: Yangfei (Felix) > Cc: gcc-patches@gcc.gnu.org; Zhanghaijian (A) > Subject: Re: [PATCH PR94026] combine missed opportunity to simp

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-13 Thread Segher Boessenkool
On Fri, Mar 13, 2020 at 03:21:18AM +, Yangfei (Felix) wrote: > > On Wed, Mar 04, 2020 at 08:39:36AM +, Yangfei (Felix) wrote: > > > This is a simple fix for PR94026. > > > With this fix, combine will try make an extraction if we are in a > > > equality > > comparison and this is an

RE: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-12 Thread Yangfei (Felix)
> -Original Message- > From: Segher Boessenkool [mailto:seg...@kernel.crashing.org] > Sent: Friday, March 13, 2020 7:50 AM > To: Yangfei (Felix) > Cc: gcc-patches@gcc.gnu.org; Zhanghaijian (A) > Subject: Re: [PATCH PR94026] combine missed opportunity to simplify >

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-12 Thread Segher Boessenkool
Hi! Please Cc: me on combine patches; you sent it nine days ago, and I didn't see it until now. On Wed, Mar 04, 2020 at 08:39:36AM +, Yangfei (Felix) wrote: > This is a simple fix for PR94026. > With this fix, combine will try make an extraction if we are in a equality > comparison

RE: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-05 Thread Yangfei (Felix)
> -Original Message- > From: Jeff Law [mailto:l...@redhat.com] > Sent: Thursday, March 5, 2020 11:37 PM > To: Yangfei (Felix) ; gcc-patches@gcc.gnu.org > Cc: Zhanghaijian (A) > Subject: Re: [PATCH PR94026] combine missed opportunity to simplify > comparisons with zero

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-05 Thread Jeff Law
On Wed, 2020-03-04 at 08:39 +, Yangfei (Felix) wrote: > Hi, > > This is a simple fix for PR94026. > With this fix, combine will try make an extraction if we are in a equality > comparison and this is an AND > with a constant which is power of two minus one. Shift here should be an >

[PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-04 Thread Yangfei (Felix)
Hi, This is a simple fix for PR94026. With this fix, combine will try make an extraction if we are in a equality comparison and this is an AND with a constant which is power of two minus one. Shift here should be an constant. For example, combine will transform (compare (and