Re: [PATCH v3] Modify combine pattern by a pseudo AND with its nonzero bits [PR93453]

2022-08-12 Thread HAO CHEN GUI via Gcc-patches
Hi Segher, On 12/8/2022 上午 1:40, Segher Boessenkool wrote: > Yes, but combine will use splitters as well. Combine pass invokes combine_split_insns for 3-insn combine. If we want to do the split for 2-insn combine (like the test case in PR), we have to add a special case? > > You can use nonzero_

Re: [PATCH v3] Modify combine pattern by a pseudo AND with its nonzero bits [PR93453]

2022-08-11 Thread Segher Boessenkool
Hi! On Thu, Aug 11, 2022 at 10:11:45AM +0800, HAO CHEN GUI wrote: > On 11/8/2022 上午 1:38, Segher Boessenkool wrote: > > On Fri, Jul 22, 2022 at 03:07:55PM +0800, HAO CHEN GUI wrote: > >> This patch creates a new function - change_pseudo_and_mask. If recog > >> fails, > >> the function converts

Re: [PATCH v3] Modify combine pattern by a pseudo AND with its nonzero bits [PR93453]

2022-08-10 Thread HAO CHEN GUI via Gcc-patches
Hi Segher, Really appreciate your review comments. On 11/8/2022 上午 1:38, Segher Boessenkool wrote: > Hi! > > Sorry for the tardiness. > > On Fri, Jul 22, 2022 at 03:07:55PM +0800, HAO CHEN GUI wrote: >> This patch creates a new function - change_pseudo_and_mask. If recog fails, >> the functi

Re: [PATCH v3] Modify combine pattern by a pseudo AND with its nonzero bits [PR93453]

2022-08-10 Thread Segher Boessenkool
Hi! Sorry for the tardiness. On Fri, Jul 22, 2022 at 03:07:55PM +0800, HAO CHEN GUI wrote: > This patch creates a new function - change_pseudo_and_mask. If recog fails, > the function converts a single pseudo to the pseudo AND with a mask if the > outer operator is IOR/XOR/PLUS and inner operat

Ping [PATCH v3] Modify combine pattern by a pseudo AND with its nonzero bits [PR93453]

2022-07-31 Thread HAO CHEN GUI via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598685.html Thanks. On 22/7/2022 下午 3:07, HAO CHEN GUI wrote: > Hi, > This patch creates a new function - change_pseudo_and_mask. If recog fails, > the function converts a single pseudo to the pseudo AND with a mask if

[PATCH v3] Modify combine pattern by a pseudo AND with its nonzero bits [PR93453]

2022-07-22 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch creates a new function - change_pseudo_and_mask. If recog fails, the function converts a single pseudo to the pseudo AND with a mask if the outer operator is IOR/XOR/PLUS and inner operator is ASHIFT or AND. The conversion helps pattern to match rotate and mask insn on some targets