[PATCH] Fix PR66552, Missed optimization when shift amount is result of signed modulus

2020-02-16 Thread Li Jia He
no regressions. Is it OK for GCC11 ? Thanks, Lijia He gcc/ChangeLog 2020-02-17 Li Jia He PR tree-optimization/66552 * match.pd (x shift (n mod pow2(c))): Optimizes to (x shift (n bit_and (pow2(c) - 1)). testsuite/ChangeLog 2019-02-17 Li Jia He PR tree

Re: [PATCH] Fix PR66552, Missed optimization when shift amount is result of signed modulus

2020-02-17 Thread Li Jia He
Hi, On 2020/2/17 4:30 PM, Richard Biener wrote: On Mon, 17 Feb 2020, Jakub Jelinek wrote: On Mon, Feb 17, 2020 at 09:01:13AM +0100, Richard Biener wrote: On Mon, 17 Feb 2020, Li Jia He wrote: This patch wants to fix PR66552 on gimple and optimizes (x shift (n mod C)) to (x shift (n bit_and

Re: [PATCH] Fix PR66552, Missed optimization when shift amount is result of signed modulus

2020-02-23 Thread Li Jia He
Hi, On 2020/2/22 11:12 PM, Marc Glisse wrote: On Tue, 18 Feb 2020, Li Jia He wrote: Also the pattern doing the standalone transform does /* Optimize TRUNC_MOD_EXPR by a power of two into a BIT_AND_EXPR,     i.e. "X % C" into "X & (C - 1)", if X and C are positive.

Re: [PATCH] Fix PR66552, Missed optimization when shift amount is result of signed modulus

2020-02-25 Thread Li Jia He
Hi, On 2020/2/24 4:16 PM, Marc Glisse wrote: On Mon, 24 Feb 2020, Li Jia He wrote: Hi, On 2020/2/22 11:12 PM, Marc Glisse wrote: On Tue, 18 Feb 2020, Li Jia He wrote: Also the pattern doing the standalone transform does /* Optimize TRUNC_MOD_EXPR by a power of two into a BIT_AND_EXPR

[PATCH] [rs6000] Fix PR92098

2019-11-26 Thread Li Jia He
-branch. The regression testing for the patch was done on GCC 9 branch on powerpc64le-unknown-linux-gnu (Power 9 LE) with no regressions. Is it OK for GCC 9 branch ? Thanks, Lijia He gcc/ChangeLog 2019-11-27 Li Jia He PR target/92098 * config/rs6000/predicates.md

Re: [PATCH] [rs6000] Fix PR92098

2019-11-26 Thread Li Jia He
On 2019/11/27 2:42 PM, Kewen.Lin wrote: Hi Lijia, on 2019/11/27 下午2:31, Li Jia He wrote: Hi, In order to fix PR92098, we need to define vec_cmp_* and vcond_mask_*. In fact, PR92132 already fixed the issue on the trunk. We need to backport PR92132 int part to gcc-9-branch. This patch

[PATCH] [RS6000] Change maddld match_operand from DI to GPR

2019-06-23 Thread Li Jia He
-06-24 Li Jia He * config/rs6000/rs6000.h (TARGET_MADDLD): Remove the restriction of TARGET_POWERPC64. * config/rs6000/rs6000.md (maddld): Change maddld match_operand from DI to GPR. gcc/testsuite/ChangeLog 2019-06-24 Li Jia He * gcc.target/powe

Re: [PATCH] [RS6000] Change maddld match_operand from DI to GPR

2019-06-25 Thread Li Jia He
On 2019/6/24 3:38 PM, Segher Boessenkool wrote: Hi Lijia, On Mon, Jun 24, 2019 at 01:00:05AM -0500, Li Jia He wrote: >From PowerPC ISA3.0, the description of `maddld RT, RA.RB, RC` is as follows: 64-bit RA and RB are multiplied and then the RC is signed extend to 128 bits, and add t

[PATCH][middle-end/88784] Middle end is missing some optimizations about unsigned

2019-06-26 Thread Li Jia He
of x is unsigned int and XXX_MIN is 0, we can still optimize it to 'x > y'. The regression testing for the patch was done on GCC mainline on powerpc64le-unknown-linux-gnu (Power 9 LE) with no regressions. Is it OK for trunk ? Thanks, Lijia He gcc/ChangeLo

Re: [PATCH][middle-end/88784] Middle end is missing some optimizations about unsigned

2019-06-27 Thread Li Jia He
On 2019/6/27 11:48 PM, Jeff Law wrote: On 6/27/19 12:11 AM, Li Jia He wrote: Hi, According to the optimizable case described by Qi Feng on issue 88784, we can combine the cases into the following: 1. x > y && x != XXX_MIN --> x > y 2. x > y && x == XX

Re: [PATCH][middle-end/88784] Middle end is missing some optimizations about unsigned

2019-07-02 Thread Li Jia He
On 2019/7/1 3:30 PM, Richard Biener wrote: On Fri, 28 Jun 2019, Andrew Pinski wrote: On Thu, Jun 27, 2019 at 9:55 PM Li Jia He wrote: On 2019/6/27 11:48 PM, Jeff Law wrote: On 6/27/19 12:11 AM, Li Jia He wrote: Hi, According to the optimizable case described by Qi Feng on issue 88784

Re: [PATCH][middle-end/88784] Middle end is missing some optimizations about unsigned

2019-07-15 Thread Li Jia He
On 2019/7/2 4:51 PM, Richard Biener wrote: On Tue, 2 Jul 2019, Richard Biener wrote: On Tue, 2 Jul 2019, Li Jia He wrote: On 2019/7/1 3:30 PM, Richard Biener wrote: On Fri, 28 Jun 2019, Andrew Pinski wrote: On Thu, Jun 27, 2019 at 9:55 PM Li Jia He wrote: On 2019/6/27 11:48 PM

[PATCH] rs6000: Fix PR 88100, range check for vec_splat_{su}{8,16,32}

2019-02-19 Thread Li Jia He
on GCC mainline on powerpc64le-unknown-linux-gnu (Power 8 LE) with no regressions. Is it OK for trunk? Thanks, Lijia --- gcc/ChangeLog 2019-02-15 Li Jia He PR target/88100 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Remove sext_hwi in IN_RANGE

Re: [PATCH] rs6000: Fix PR 88100, range check for vec_splat_{su}{8,16,32}

2019-02-19 Thread Li Jia He
Yes, you are correct. If there is no question with this patch, I will backport this to GCC 8. Thanks, Lijia On 2019/2/20 12:13 PM, Bill Schmidt wrote: On 2/19/19 8:11 AM, Segher Boessenkool wrote: Hi! On Tue, Feb 19, 2019 at 03:38:56AM -0600, Li Jia He wrote: GCC revision 259524

[PATCH] Fix a typo in two_value_replacement function

2019-05-04 Thread Li Jia He
? Thanks, Lijia He gcc/ChangeLog 2019-05-05 Li Jia He * tree-ssa-phiopt.c (two_value_replacement): Fix a typo in parameter detection. gcc/testsuite/ChangeLog 2019-05-05 Li Jia He * gcc.dg/pr88676.c: Modify the include header file. * gcc.dg/tree-ssa/pr37508

Re: [PATCH] Fix a typo in two_value_replacement function

2019-05-06 Thread Li Jia He
On 2019/5/6 7:35 PM, Jakub Jelinek wrote: On Mon, May 06, 2019 at 01:19:15PM +0200, Christophe Lyon wrote: The regression testing for the patch was done on GCC mainline on powerpc64le-unknown-linux-gnu (Power 9 LE) with no regressions. Is it OK for trunk and backport to gcc 9 ? Whil

Re: [PATCH] Fix a typo in two_value_replacement function

2019-05-06 Thread Li Jia He
On 2019/5/6 8:27 PM, Jakub Jelinek wrote: On Mon, May 06, 2019 at 08:22:41PM +0800, Li Jia He wrote: Dunno why this changed, if you want it in phiopt1, you need "phiopt1" in scan-tree-dump-not as well, if you want optimized dump, you need -fdump-tree-optimized instead. When I tes

Re: [PATCH] Fix a typo in two_value_replacement function

2019-05-06 Thread Li Jia He
On 2019/5/6 7:19 PM, Christophe Lyon wrote: On Sun, 5 May 2019 at 08:31, Li Jia He wrote: Hi, GCC revision 267634 implemented two_value_replacement function. However, a typo occurred during the parameter check, which caused us to miss some optimizations. The intent of the code might be

[PATCH] Add myself to MAINTAINERS

2019-01-17 Thread Li Jia He
copy) @@ -409,6 +409,7 @@  Pat Haugen                     Michael Hayes  Alan Hayward                    +Li Jia He                     Mark Heffernan                     George Helffrich                 Daniel Hellstrom