Re: [PATCH] Fix PR80539

2017-04-27 Thread Bin.Cheng
On Thu, Apr 27, 2017 at 10:25 AM, Richard Biener wrote: > > SCEV analysis requires us to be in loop-closed SSA form to be able > to compute overall effects of inner loops when required. Unfortunately > we have too many places it is used where we are not in loop-closed SSA >

Re: [PATCH GCC8][28/33]Don't count non-interger PHIs for register pressure

2017-04-26 Thread Bin.Cheng
On Wed, Apr 26, 2017 at 3:23 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Apr 26, 2017 at 3:37 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Wed, Apr 26, 2017 at 2:32 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>> O

Re: [PATCH GCC8][25/33]New loop constraint flags

2017-04-26 Thread Bin.Cheng
On Wed, Apr 26, 2017 at 2:27 PM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:51 PM, Bin Cheng wrote: >> Hi, >> This patch adds new loop constraint flags marking prologue, epilogue and >> versioned loops generated >> by vectorizer, unroller

Re: [PATCH 24/33]New parameter bound on number of selected candidates

2017-04-26 Thread Bin.Cheng
On Wed, Apr 26, 2017 at 2:22 PM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:50 PM, Bin Cheng wrote: >> Hi, >> IVOPTs still have difficulty for outer loop (especially for large loop >> nest), and tend to select too many candidates. >> It's

Re: [PATCH GCC8][28/33]Don't count non-interger PHIs for register pressure

2017-04-26 Thread Bin.Cheng
On Wed, Apr 26, 2017 at 2:32 PM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:52 PM, Bin Cheng wrote: >> Hi, >> Given only integer variables are meaningful for register pressure estimation >> in IVOPTs, >> this patch skips non-integer type

Re: [PATCH GCC8][14/33]Handle more cheap operations in force_expr_to_var_cost

2017-04-26 Thread Bin.Cheng
On Wed, Apr 26, 2017 at 1:58 PM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:44 PM, Bin Cheng wrote: >> Hi, >> This patch handles more cheap cases in function force_expr_to_var_cost, >> specifically, >> TRUNC_DIV_EXPR, BIT_AND_EXPR,

Re: [PATCH GCC8][22/33]Generate TMR in new reassociation order

2017-04-26 Thread Bin.Cheng
This is another one where context diff might help. No code change from previous version. Thanks, bin On Tue, Apr 18, 2017 at 11:49 AM, Bin Cheng wrote: > Hi, > This patch generates TMR for ivopts in new re-association order. General > idea is, > by querying target's

Re: [PATCH GCC8][13/33]Rewrite cost computation of ivopts

2017-04-26 Thread Bin.Cheng
On Wed, Apr 26, 2017 at 10:50 AM, Richard Biener wrote: > On Tue, Apr 18, 2017 at 12:43 PM, Bin Cheng wrote: >> Hi, >> This is the major part of this patch series. It rewrites cost computation >> of ivopts using tree affine. >> Apart from

Re: [PATCH] Add test-case (PR tree-optimization/66278).

2017-04-20 Thread Bin.Cheng
On Thu, Apr 20, 2017 at 9:35 AM, Martin Liška wrote: > Hello. > > The patch adds a new test-case for the mentioned PR. Tested on > x86_64-linux-gnu > and ppc64le-linux-gnu. > > Ready for trunk or should I postpone it for next stage1? Though can't approve, I think it's ok since we

Re: [PATCH GCC8][33/33]Fix PR69710/PR68030 by reassociate vect base address and a simple CSE pass

2017-04-19 Thread Bin.Cheng
On Wed, Apr 19, 2017 at 9:33 PM, Michael Meissner <meiss...@linux.vnet.ibm.com> wrote: > On Wed, Apr 19, 2017 at 02:08:49PM +0100, Bin.Cheng wrote: >> Hi Michael, >> Thanks for testing it. Could you have a check if updated patch >> resolves the ICE? >> As fo

Re: [PATCH GCC8][33/33]Fix PR69710/PR68030 by reassociate vect base address and a simple CSE pass

2017-04-19 Thread Bin.Cheng
On Tue, Apr 18, 2017 at 10:25 PM, Michael Meissner wrote: > I did a bootstrap and make check-{gcc,c++,fortran,lto} comparing the results > to > the baseline (subversion id 246975). > > There were 2 differences: > > The baseline failed on gcc.dg/sms-4.c but succeeded

Re: [PATCH GCC8][04/33]Single interface finding invariant variables

2017-04-18 Thread Bin.Cheng
On Tue, Apr 18, 2017 at 1:20 PM, Trevor Saunders wrote: > On Tue, Apr 18, 2017 at 10:39:30AM +, Bin Cheng wrote: >> -find_depends (tree *expr_p, int *ws ATTRIBUTE_UNUSED, void *data) >> +find_inv_vars_cb (tree *expr_p, int *ws ATTRIBUTE_UNUSED, void *data) >> { >> -

Re: [RFC] S/390: Alignment peeling prolog generation

2017-04-11 Thread Bin.Cheng
On Tue, Apr 11, 2017 at 4:03 PM, Robin Dapp wrote: > Hi Bin, > >> Seems Richi added code like below comparing costs between aligned and >> unsigned loads, and only peeling if it's beneficial: >> >> /* In case there are only loads with different unknown

Re: [RFC] S/390: Alignment peeling prolog generation

2017-04-11 Thread Bin.Cheng
On Tue, Apr 11, 2017 at 3:38 PM, Robin Dapp wrote: > Hi, > > when looking at various vectorization examples on s390x I noticed that > we still peel vf/2 iterations for alignment even though vectorization > costs of unaligned loads and stores are the same as normal

Re: [PATCH] Fix PR80281

2017-04-05 Thread Bin.Cheng
On Wed, Apr 5, 2017 at 12:38 PM, Markus Trippelsdorf wrote: > On 2017.04.03 at 15:20 +0200, Richard Biener wrote: >> I'm re-testing the following variant. >> >> Richard. >> >> 2017-04-03 Richard Biener >> >> PR middle-end/80281 >> *

Re: [PATCH PR80153]Always generate folded type conversion in tree-affine

2017-04-05 Thread Bin.Cheng
And the patch.. On Wed, Apr 5, 2017 at 8:25 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Thu, Mar 30, 2017 at 2:34 PM, Richard Biener > <richard.guent...@gmail.com> wrote: >> On Thu, Mar 30, 2017 at 3:20 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >&

Re: [PATCH PR80153]Always generate folded type conversion in tree-affine

2017-04-05 Thread Bin.Cheng
On Thu, Mar 30, 2017 at 2:34 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, Mar 30, 2017 at 3:20 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Thu, Mar 30, 2017 at 2:18 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >>> On Thu, Mar

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-31 Thread Bin.Cheng
On Fri, Mar 31, 2017 at 2:57 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Fri, Mar 31, 2017 at 11:37 AM, Richard Biener <rguent...@suse.de> wrote: >> On Fri, 31 Mar 2017, Markus Trippelsdorf wrote: >> >>> On 2017.03.31 at 11:16 +0200, Richard Biener wrote

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-31 Thread Bin.Cheng
On Fri, Mar 31, 2017 at 11:37 AM, Richard Biener wrote: > On Fri, 31 Mar 2017, Markus Trippelsdorf wrote: > >> On 2017.03.31 at 11:16 +0200, Richard Biener wrote: >> > On Fri, 31 Mar 2017, Richard Biener wrote: >> > >> > > On Fri, 31 Mar 2017, Rainer Orth wrote: >> > > >> > > >

Re: [PATCH PR80153]Always generate folded type conversion in tree-affine

2017-03-30 Thread Bin.Cheng
On Thu, Mar 30, 2017 at 2:18 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Thu, Mar 30, 2017 at 1:44 PM, Richard Biener > <richard.guent...@gmail.com> wrote: >> On Thu, Mar 30, 2017 at 2:03 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >>> On Thu, M

Re: [PATCH PR80153]Always generate folded type conversion in tree-affine

2017-03-30 Thread Bin.Cheng
On Thu, Mar 30, 2017 at 1:44 PM, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, Mar 30, 2017 at 2:03 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Thu, Mar 30, 2017 at 11:37 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH PR80153]Always generate folded type conversion in tree-affine

2017-03-30 Thread Bin.Cheng
On Thu, Mar 30, 2017 at 11:37 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Mar 29, 2017 at 5:22 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Tue, Mar 28, 2017 at 1:34 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH][RFC] Fix P1 PR77498

2017-03-29 Thread Bin.Cheng
On Wed, Mar 29, 2017 at 11:05 AM, Richard Biener wrote: > > After quite some pondering over this and other related bugs I propose > the following for GCC 7 which tames down PRE a bit (back to levels > of GCC 6). Technically it's the wrong place to fix this, we do > have

Re: [PATCH PR80153]Always generate folded type conversion in tree-affine

2017-03-29 Thread Bin.Cheng
On Tue, Mar 28, 2017 at 1:34 PM, Richard Biener wrote: > On Tue, Mar 28, 2017 at 2:01 PM, Bin Cheng wrote: >> Hi, >> This patch is to fix PR80153. As analyzed in the PR, root cause is >> tree_affine lacks >> ability differentiating (unsigned)(ptr

Re: [PATCH PR69564]Improve vectorizer's runtime alias check for wrapping type

2017-02-27 Thread Bin.Cheng
On Fri, Feb 24, 2017 at 12:34 PM, Richard Biener wrote: > On Fri, Feb 24, 2017 at 11:53 AM, Bin Cheng wrote: >> Hi, >> As analyzed in PR69564, inefficient code for runtime alias check is >> generated in benchmark >> scimark2. It is suspected

Re: [PATCH PR77536]Generate correct profiling information for vectorized loop

2017-02-22 Thread Bin.Cheng
On Tue, Feb 21, 2017 at 3:49 PM, Jan Hubicka wrote: >> 2017-02-21 Bin Cheng >> >> PR tree-optimization/77536 >> * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function. >> (tree_transform_and_unroll_loop): Use above function to compute the >>

Re: [PATCH PR77536]Generate correct profiling information for vectorized loop

2017-02-21 Thread Bin.Cheng
On Mon, Feb 20, 2017 at 4:05 PM, Jan Hubicka wrote: >> BTW, if we use gcov_type in calculation from >> expected_loop_iterations_unbounded, >> how should we adjust the number for calling scale_loop_frequencies >> which has int type? In extreme case, gcov_type could be out of

Re: [PATCH PR77536]Generate correct profiling information for vectorized loop

2017-02-20 Thread Bin.Cheng
On Mon, Feb 20, 2017 at 4:05 PM, Jan Hubicka wrote: >> BTW, if we use gcov_type in calculation from >> expected_loop_iterations_unbounded, >> how should we adjust the number for calling scale_loop_frequencies >> which has int type? In extreme case, gcov_type could be out of

Re: [PATCH PR77536]Generate correct profiling information for vectorized loop

2017-02-20 Thread Bin.Cheng
On Mon, Feb 20, 2017 at 3:17 PM, Jan Hubicka wrote: >> > + /* Without profile feedback, loops for which we do not know a better >> > estimate >> > + are assumed to roll 10 times. When we unroll such loop, it appears >> > to >> > + roll too little, and it may even seem

Re: [PATCH PR77536]Generate correct profiling information for vectorized loop

2017-02-20 Thread Bin.Cheng
On Mon, Feb 20, 2017 at 2:02 PM, Jan Hubicka wrote: >> > 2017-02-16 Bin Cheng >> > >> > PR tree-optimization/77536 >> > * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function. >> > (tree_transform_and_unroll_loop): Use above

Re: [PATCH PR71437/V2]Simplify cond with assertions in threading

2017-02-17 Thread Bin.Cheng
On Fri, Feb 17, 2017 at 3:40 AM, Jeff Law wrote: > On 02/14/2017 03:05 AM, Bin Cheng wrote: >> >> Hi, >> This is the second try fixing PR71437. The old version patch tried to fix >> issue in VRP but it requires further non-trivial change in VRP, >> specifically, to better

Re: [PATCH PR79347]Maintain profile counter information in vect_do_peeling

2017-02-15 Thread Bin.Cheng
On Tue, Feb 14, 2017 at 2:13 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Tue, Feb 14, 2017 at 1:57 PM, Jan Hubicka <hubi...@ucw.cz> wrote: >>> Thanks, >>> bin >>> 2017-02-13 Bin Cheng <bin.ch...@arm.com> >>> >>>

Re: [PATCH] Fix PR79460

2017-02-14 Thread Bin.Cheng
On Tue, Feb 14, 2017 at 2:48 PM, Richard Biener wrote: > > The following enables final value replacement for floating point > expressions if -funsafe-math-optimizations is set (that's the > flag the reassoc pass controls similar transforms on). Looks to me it's kind of abusing

Re: [PATCH PR79347]Maintain profile counter information in vect_do_peeling

2017-02-14 Thread Bin.Cheng
On Tue, Feb 14, 2017 at 1:57 PM, Jan Hubicka wrote: >> Thanks, >> bin >> 2017-02-13 Bin Cheng >> >> PR tree-optimization/79347 >> * tree-vect-loop-manip.c (apply_probability_for_bb): New function. >> (vect_do_peeling): Maintain profile

Re: [PATCH PR78559][RFC]Proposed fix

2017-01-27 Thread Bin.Cheng
On Wed, Jan 25, 2017 at 4:25 PM, Segher Boessenkool <seg...@kernel.crashing.org> wrote: > On Wed, Jan 25, 2017 at 04:08:54PM +, Bin.Cheng wrote: >> > I was worried this patch would prevent too many other optimisations, >> > so I looked into better options. I

Re: [PATCH PR78559][RFC]Proposed fix

2017-01-25 Thread Bin.Cheng
On Wed, Jan 25, 2017 at 3:56 PM, Segher Boessenkool wrote: > Hi! > > I was worried this patch would prevent too many other optimisations, > so I looked into better options. I didn't find any. I tested the > effects of the patch on 31 architectures (building GCC and

Re: [PATCH] Be careful about combined chain with length == 0 (PR, tree-optimization/70754).

2017-01-20 Thread Bin.Cheng
On Thu, Jan 19, 2017 at 12:07 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Thu, Jan 19, 2017 at 11:22 AM, Richard Biener > <richard.guent...@gmail.com> wrote: >> On Thu, Jan 19, 2017 at 11:25 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >>> On Thu,

Re: [PATCH] Be careful about combined chain with length == 0 (PR, tree-optimization/70754).

2017-01-19 Thread Bin.Cheng
On Thu, Jan 19, 2017 at 11:22 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, Jan 19, 2017 at 11:25 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Thu, Jan 19, 2017 at 9:42 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH] Be careful about combined chain with length == 0 (PR, tree-optimization/70754).

2017-01-19 Thread Bin.Cheng
On Thu, Jan 19, 2017 at 9:42 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Jan 18, 2017 at 4:32 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Wed, Jan 18, 2017 at 2:54 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH] Be careful about combined chain with length == 0 (PR, tree-optimization/70754).

2017-01-18 Thread Bin.Cheng
On Wed, Jan 18, 2017 at 2:54 PM, Richard Biener wrote: > On Wed, Jan 18, 2017 at 11:10 AM, Martin Liška wrote: >> Hello. >> >> >> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. >> >> Ready to be installed? > > I'm not sure.

Re: [PATCH] Be careful about combined chain with length == 0 (PR, tree-optimization/70754).

2017-01-18 Thread Bin.Cheng
On Wed, Jan 18, 2017 at 10:10 AM, Martin Liška wrote: > Hello. > > After basic understanding of loop predictive commoning, the problematic > combined chain is: > > Loads-only chain 0x38b6730 (combined) > max distance 0 > references: > MEM[(real(kind=8) *)vectp_a.29_81]

Re: [PATCH TEST]Add test for PR78652

2017-01-13 Thread Bin.Cheng
On Mon, Dec 12, 2016 at 4:35 PM, Jakub Jelinek wrote: > On Mon, Dec 12, 2016 at 09:32:30AM -0700, Jeff Law wrote: >> On 12/09/2016 03:20 AM, Bin Cheng wrote: >> >Hi, >> >PR78652 was fixed by patch for PR77856, this patch adds a test for it. >> >Test result checked, is it OK?

Re: [PATCH] Fix gcc.dg/tree-ssa/scev-[345].c testcases

2017-01-13 Thread Bin.Cheng
On Fri, Jan 13, 2017 at 9:46 AM, Richard Biener wrote: > > The following is an attempt to change those testcases to be less dependent > on previous passes. The original motivation of the testcases seems to be > testing SCEV capabilities and in turn IVOPTs decisions, thus the

Re: [PATCH GCC]Simplify (cond (cmp (convert? x) c1) (op x c2) c3) -> (op (minmax x c1) c2)

2016-12-02 Thread Bin.Cheng
On Wed, Nov 30, 2016 at 3:10 PM, Richard Biener wrote: > On Fri, Nov 18, 2016 at 5:53 PM, Bin Cheng wrote: >> Hi, >> This is a rework of https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02007.html. >> Though review comments suggested it could be merged

Re: [PATCH] combine: Tweak change_zero_ext

2016-11-30 Thread Bin.Cheng
On Tue, Nov 29, 2016 at 9:14 PM, Christophe Lyon wrote: > On 29 November 2016 at 20:38, Uros Bizjak wrote: >>> 2016-11-26 Segher Boessenkool >>> >>> * combine.c (change_zero_ext): Also handle extends from a subreg >>>

Re: [PATCH PR78507/PR78510]Fix two ICEs in pattern (cond (cmp (convert1? @1) @3) (convert2? @1) @2).

2016-11-25 Thread Bin.Cheng
On Fri, Nov 25, 2016 at 8:23 AM, Richard Biener wrote: > On Thu, Nov 24, 2016 at 4:22 PM, Bin Cheng wrote: >> Hi, >> This patch fixes two issues in newly introduced pattern: (cond (cmp >> (convert1? @1) @3) (convert2? @1) @2). >> For PR78507, we

Re: [PATCH GCC]Refine type conversion in result expressions for cond_expr pattern

2016-11-24 Thread Bin.Cheng
On Thu, Nov 24, 2016 at 11:17 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, Nov 24, 2016 at 11:11 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Thu, Nov 24, 2016 at 8:57 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC]Refine type conversion in result expressions for cond_expr pattern

2016-11-24 Thread Bin.Cheng
Here is the patch. Thanks, bin On Thu, Nov 24, 2016 at 10:11 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Thu, Nov 24, 2016 at 8:57 AM, Richard Biener > <richard.guent...@gmail.com> wrote: >> On Wed, Nov 23, 2016 at 3:57 PM, Bin.Cheng <amker.ch...@gmail.com> w

Re: [PATCH GCC]Refine type conversion in result expressions for cond_expr pattern

2016-11-24 Thread Bin.Cheng
On Thu, Nov 24, 2016 at 8:57 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Nov 23, 2016 at 3:57 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Wed, Nov 23, 2016 at 2:27 PM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH GCC]Refine type conversion in result expressions for cond_expr pattern

2016-11-23 Thread Bin.Cheng
On Wed, Nov 23, 2016 at 2:27 PM, Richard Biener wrote: > On Wed, Nov 23, 2016 at 2:54 PM, Bin Cheng wrote: >> Hi, >> This is actually the review suggestion for patch >> @https://gcc.gnu.org/ml/gcc-patches/2016-11/msg02341.html, but I forgot to >>

Re: [PATCH GCC]Move simplification of (A == C1) ? A : C2 to match.pd

2016-11-23 Thread Bin.Cheng
On Wed, Nov 23, 2016 at 2:40 PM, Marc Glisse wrote: > On Fri, 18 Nov 2016, Bin Cheng wrote: > > +(for cmp (lt le gt ge) > + (simplify > + (cond (cmp@0 (convert1? @1) INTEGER_CST@3) (convert2? @1) INTEGER_CST@2) > + (with > + { > + tree from_type = TREE_TYPE (@1); > +

Re: [PATCH GCC]Move simplification from fold-cond.c to match.pd and extend it

2016-11-23 Thread Bin.Cheng
On Wed, Nov 23, 2016 at 10:51 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Nov 23, 2016 at 11:40 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Wed, Nov 23, 2016 at 10:29 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>

Re: [PATCH GCC]Move simplification from fold-cond.c to match.pd and extend it

2016-11-23 Thread Bin.Cheng
On Wed, Nov 23, 2016 at 10:29 AM, Richard Biener wrote: > On Fri, Nov 18, 2016 at 11:20 AM, Bin Cheng wrote: >> Hi, >> This is a rework of >> https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02005.html. According to >> review comment, I extended the

Re: [PATCH PR68030/PR69710][RFC]Introduce a simple local CSE interface and use it in vectorizer

2016-11-22 Thread Bin.Cheng
On Mon, Nov 21, 2016 at 9:34 PM, Doug Gilmore wrote: > I haven't seen any followups to this discussion of Bin's patch to > PR68303 and PR69710, the patch submission: > http://gcc.gnu.org/ml/gcc-patches/2016-05/msg02000.html > > Discussion: >

Re: [PATCH, ARM] Enable ldrd/strd peephole rules unconditionally

2016-11-21 Thread Bin.Cheng
On Fri, Nov 18, 2016 at 3:50 PM, Bernd Edlinger wrote: > On 11/18/16 12:58, Christophe Lyon wrote: >> On 17 November 2016 at 10:23, Kyrill Tkachov >> wrote: >>> >>> On 09/11/16 12:58, Bernd Edlinger wrote: Hi! This

Re: [PATCH PR78114]Refine gfortran.dg/vect/fast-math-mgrid-resid.f

2016-11-18 Thread Bin.Cheng
On Fri, Nov 18, 2016 at 4:52 PM, Michael Matz <m...@suse.de> wrote: > Hi, > > On Thu, 17 Nov 2016, Bin.Cheng wrote: > >> B) Depending on ilp, I think below test strings fail for long time with >> haswell: >> ! { dg-final { scan-tree-dump-times "Executing

Re: Fix PR77881: combine improvement

2016-11-18 Thread Bin.Cheng
On Wed, Nov 16, 2016 at 3:05 PM, Andreas Schwab wrote: > On Nov 14 2016, Michael Matz wrote: > >> PR missed-optimization/77881 >> * combine.c (simplify_comparison): Remove useless subregs >> also inside the loop, not just after it. >>

Re: [PATCH PR78114]Refine gfortran.dg/vect/fast-math-mgrid-resid.f

2016-11-17 Thread Bin.Cheng
On Thu, Nov 17, 2016 at 10:53 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, Nov 17, 2016 at 11:26 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Thu, Nov 17, 2016 at 8:32 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: [PATCH PR78114]Refine gfortran.dg/vect/fast-math-mgrid-resid.f

2016-11-17 Thread Bin.Cheng
On Thu, Nov 17, 2016 at 8:32 AM, Richard Biener wrote: > On Wed, Nov 16, 2016 at 6:20 PM, Bin Cheng wrote: >> Hi, >> Currently test gfortran.dg/vect/fast-math-mgrid-resid.f checks all >> predictive commoning opportunities for all possible loops.

Re: [PATCH, RFC] Improve ivopts group costs

2016-11-14 Thread Bin.Cheng
On Sat, Nov 12, 2016 at 8:36 AM, Evgeny Kudryashov <kudryas...@ispras.ru> wrote: > On 2016-11-10 13:30, Bin.Cheng wrote: >> >> Hi, >> I see the cost problem with your test now. When computing an address >> type iv_use with a candidate, the computation consists of

Re: [RFC] Handle unary pass-through jump functions for ipa-vrp

2016-11-11 Thread Bin.Cheng
On Tue, Nov 8, 2016 at 10:13 AM, kugan wrote: > Hi, > > > > On 04/11/16 04:36, Martin Jambor wrote: >> >> Hi, >> >> On Fri, Oct 28, 2016 at 02:03:47PM +1100, kugan wrote: >>> >>> >>> ...snip... >>> >>> I have also separated the constant parameter conversion out

Re: [PATCH, RFC] Improve ivopts group costs

2016-11-10 Thread Bin.Cheng
On Wed, Nov 9, 2016 at 1:02 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Thu, Nov 3, 2016 at 4:00 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Thu, Nov 3, 2016 at 1:35 PM, Evgeny Kudryashov <kudryas...@ispras.ru> >> wrote: >>> Hello, >&g

Re: [PATCH TEST]Drop xfail for gcc.dg/vect/vect-cond-2.c

2016-11-10 Thread Bin.Cheng
On Wed, Nov 9, 2016 at 9:46 PM, Christophe Lyon wrote: > Hi Bin > > On 8 November 2016 at 13:37, Bin Cheng wrote: >> Hi, >> Test gcc.dg/vect/vect-cond-2.c can be vectorized by GCC now, this patch >> drops the xfail. >> >> Thanks, >> bin >> >>

Re: [PATCH, RFC] Improve ivopts group costs

2016-11-09 Thread Bin.Cheng
On Thu, Nov 3, 2016 at 4:00 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Thu, Nov 3, 2016 at 1:35 PM, Evgeny Kudryashov <kudryas...@ispras.ru> > wrote: >> Hello, >> >> I'm facing the following problem related to ivopts. The problem is that GCC >&

Re: [PATCH, vec-tails] Support loop epilogue vectorization

2016-11-09 Thread Bin.Cheng
by any means. Also it's not related to SVE, As a matter of fact, I haven't read any document about SVE yet. Sorry again for the false impression conveyed by previous messages. Thanks, bin > > Thanks. > Yuri. > > 2016-11-09 14:46 GMT+03:00 Bin.Cheng <amker.ch...@gmail.com>: &

Re: [PATCH, vec-tails] Support loop epilogue vectorization

2016-11-09 Thread Bin.Cheng
ntinue working on this project. > > Any help will be appreciated. > > Thanks. > Yuri. > > 2016-11-09 13:37 GMT+03:00 Bin.Cheng <amker.ch...@gmail.com>: >> On Tue, Nov 1, 2016 at 12:38 PM, Yuri Rumyantsev <ysrum...@gmail.com> wrote: >>> Hi All, >&g

Re: [PATCH, vec-tails] Support loop epilogue vectorization

2016-11-09 Thread Bin.Cheng
On Tue, Nov 1, 2016 at 12:38 PM, Yuri Rumyantsev wrote: > Hi All, > > I re-send all patches sent by Ilya earlier for review which support > vectorization of loop epilogues and loops with low trip count. We > assume that the only patch - vec-tails-07-combine-tail.patch - was

Re: RFA (libstdc++): C++ PATCH to implement C++17 noexcept in type system

2016-11-09 Thread Bin.Cheng
On Tue, Nov 8, 2016 at 9:11 AM, Christophe Lyon wrote: > Hi, > > On 7 November 2016 at 23:56, Jonathan Wakely wrote: >> On 7 November 2016 at 22:49, Jason Merrill wrote: >>> Tested x86_64-pc-linux-gnu. Are the libstdc++ changes OK for trunk? >>

Re: [PATCH] Fix PR78189

2016-11-09 Thread Bin.Cheng
On Tue, Nov 8, 2016 at 9:11 AM, Richard Biener wrote: > On Mon, 7 Nov 2016, Christophe Lyon wrote: > >> Hi Richard, >> >> >> On 7 November 2016 at 09:01, Richard Biener wrote: >> > >> > The following fixes an oversight when computing alignment in the >> >

Re: [PATCH, RFC] Improve ivopts group costs

2016-11-03 Thread Bin.Cheng
On Thu, Nov 3, 2016 at 1:35 PM, Evgeny Kudryashov wrote: > Hello, > > I'm facing the following problem related to ivopts. The problem is that GCC > generates a lot of induction variables and as a result there is an > unnecessary increase of stack usage and register pressure.

Re: [PATCH] combine: Improve change_zero_ext (fixes PR71847)

2016-11-02 Thread Bin.Cheng
On Tue, Oct 25, 2016 at 11:40 AM, Segher Boessenkool wrote: > This improves a few things in change_zero_ext. Firstly, it should use > the passed in pattern in recog_for_combine, not the pattern of the insn > (they are not the same if the whole pattern was replaced).

Re: [PATCH v2][AArch32][NEON] Implementing vmaxnmQ_ST and vminnmQ_ST intrinsincs.

2016-11-02 Thread Bin.Cheng
On Tue, Nov 1, 2016 at 12:21 PM, Kyrill Tkachov wrote: > Hi Tamar, > > > On 26/10/16 16:01, Tamar Christina wrote: >> >> Hi Christophe, >> >> Here's the updated patch. >> >> Cheers, >> Tamar >> >> From: Christophe Lyon

Re: [PATCH testsuite]Require vect_cond_mixed for test case gcc.dg/vect/pr56541.c

2016-11-02 Thread Bin.Cheng
On Wed, Nov 2, 2016 at 11:08 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Tue, Nov 1, 2016 at 4:24 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Thu, Aug 11, 2016 at 11:38 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>> O

Re: [PATCH VECT]Swap operands for cond_reduction when necessary

2016-11-01 Thread Bin.Cheng
On Fri, Oct 28, 2016 at 1:38 PM, Richard Biener wrote: > On Wed, Oct 26, 2016 at 6:42 PM, Bin Cheng wrote: >> Hi, >> For stmt defining reduction, GCC vectorizer assumes that the reduction >> variable is always the last (second) operand. Another

Re: [PATCH testsuite]Require vect_cond_mixed for test case gcc.dg/vect/pr56541.c

2016-11-01 Thread Bin.Cheng
On Thu, Aug 11, 2016 at 11:38 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, Aug 11, 2016 at 11:56 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Thu, Aug 11, 2016 at 10:50 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>

Re: [PATCH VECT]Support operand swapping for cond_expr in vect_slp

2016-10-31 Thread Bin.Cheng
On Fri, Oct 28, 2016 at 1:17 PM, Richard Biener wrote: > On Thu, Oct 27, 2016 at 3:37 PM, Bin Cheng wrote: >> Hi, >> During analysis, vect_slp checks if statements of a group are isomorphic to >> each other, specifically, all statements have to be

Re: [PATCH] Fix computation of register limit for -fsched-pressure

2016-10-28 Thread Bin.Cheng
On Fri, Oct 28, 2016 at 12:27 PM, Tamar Christina wrote: > Looking at it again, > > it seems to be that the testcase should be adjusted. > There's no actual spilling. It just uses more registers than before due to > the scheduling. Sorry I didn't look into the test, but

Re: [PATCH GCC][2/4]Simplify (cond (cmp (convert (x), c1), x, c2)) into (minmax (x, c))

2016-10-27 Thread Bin.Cheng
On Thu, Oct 27, 2016 at 2:58 PM, Richard Biener wrote: > On Tue, Oct 25, 2016 at 1:21 PM, Bin Cheng wrote: >> Hi, >> Second patch optimizing (cond (cmp (convert (x), c1), x, c2)) into (minmax >> (x, c)). As commented in patch, this is done if: >>

Re: [PATCH GCC][1/4]Simplify (convert1 (minmax ((convert2 (x) c)))) into minmax (x c)

2016-10-26 Thread Bin.Cheng
On Wed, Oct 26, 2016 at 4:05 PM, Marc Glisse <marc.gli...@inria.fr> wrote: > On Wed, 26 Oct 2016, Bin.Cheng wrote: > >> On Wed, Oct 26, 2016 at 3:10 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: >>> >>> On Wed, Oct 26, 2016 at 3:04 PM, Marc Glisse <marc

Re: [PATCH GCC][1/4]Simplify (convert1 (minmax ((convert2 (x) c)))) into minmax (x c)

2016-10-26 Thread Bin.Cheng
On Wed, Oct 26, 2016 at 3:10 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Wed, Oct 26, 2016 at 3:04 PM, Marc Glisse <marc.gli...@inria.fr> wrote: >> On Wed, 26 Oct 2016, Bin.Cheng wrote: >> >>> Thanks for reviewing, updated patch attached. Is it OK? >&g

Re: [PATCH GCC][1/4]Simplify (convert1 (minmax ((convert2 (x) c)))) into minmax (x c)

2016-10-26 Thread Bin.Cheng
On Wed, Oct 26, 2016 at 3:04 PM, Marc Glisse <marc.gli...@inria.fr> wrote: > On Wed, 26 Oct 2016, Bin.Cheng wrote: > >> Thanks for reviewing, updated patch attached. Is it OK? > > > +/* (convert (minmax ((convert (x) c -> minmax (x c) if x is promoted >

Re: [PATCH GCC][3/4]Add support for constant operand in pattern (convert (op:s (convert@2 @0) (convert?@3 @1)))

2016-10-26 Thread Bin.Cheng
On Tue, Oct 25, 2016 at 1:00 PM, Richard Biener wrote: > On Tue, Oct 25, 2016 at 1:21 PM, Bin Cheng wrote: >> Hi, >> This is an update patch for >> https://gcc.gnu.org/ml/gcc-patches/2016-10/msg00738.html . In this version, >> existing pattern

Re: [PATCH GCC][1/4]Simplify (convert1 (minmax ((convert2 (x) c)))) into minmax (x c)

2016-10-26 Thread Bin.Cheng
On Tue, Oct 25, 2016 at 12:48 PM, Richard Biener wrote: > On Tue, Oct 25, 2016 at 1:21 PM, Bin Cheng wrote: >> Hi, >> This is a patch set adding various match.pd patterns in order to generate >> simplified MIN/MAX_EXPR mostly from COND_EXPR. This

Re: Gimple loop splitting v2

2016-10-24 Thread Bin.Cheng
On Thu, Oct 20, 2016 at 3:55 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Thu, Oct 20, 2016 at 3:43 PM, Michael Matz <m...@suse.de> wrote: >> Hi, >> >> On Sat, 5 Dec 2015, Jeff Law wrote: >> >>> Nit. I don't think you want a comma after "s

Re: [PATCH GCC]New vectorization pattern turning cond_expr into max/min and plus/minus

2016-10-20 Thread Bin.Cheng
On Wed, Oct 12, 2016 at 9:50 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Oct 12, 2016 at 10:29 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: >> On Wed, Oct 12, 2016 at 9:12 AM, Richard Biener >> <richard.guent...@gmail.com> wrote: >>>

Re: Gimple loop splitting v2

2016-10-20 Thread Bin.Cheng
On Thu, Oct 20, 2016 at 3:43 PM, Michael Matz wrote: > Hi, > > On Sat, 5 Dec 2015, Jeff Law wrote: > >> Nit. I don't think you want a comma after "so". And it looks like your >> comment got truncated as well. >> >> With the comment above fixed, this is fine for the trunk. > > I'm

Re: [PATCH AArch64]Penalize vector cost for large loops with too many vect insns.

2016-10-17 Thread Bin.Cheng
On Sat, Oct 15, 2016 at 3:07 AM, kugan wrote: > Hi Bin, > > On 15/10/16 00:15, Bin Cheng wrote: >> >> +/* Test for likely overcommitment of vector hardware resources. If a >> + loop iteration is relatively large, and too large a percentage of >> +

Re: [PATCH GCC 9/9]Prove no-overflow in computation of LOOP_VINFO_NITERS and improve code generation

2016-10-13 Thread Bin.Cheng
On Mon, Sep 12, 2016 at 8:58 PM, Jeff Law wrote: > On 09/06/2016 12:54 PM, Bin Cheng wrote: >> >> Hi, >> LOOP_VINFO_NITERS is computed as LOOP_VINFO_NITERSM1 + 1, which could >> overflow in loop niters' type. Vectorizer needs to generate more code >> computing vectorized niters

Re: [PATCH GCC 2/9]Add interface reseting original copy tables in cfg.c

2016-10-13 Thread Bin.Cheng
On Wed, Sep 7, 2016 at 1:20 PM, Jeff Law wrote: > On 09/06/2016 12:50 PM, Bin Cheng wrote: >> >> Hi, >> This simple patch adds interface reseting original copy table in cfg.c. >> This will be used in rewriting vect_do_peeling_* functions in vectorizer so >> that we don't need to

Re: [PATCH GCC]New vectorization pattern turning cond_expr into max/min and plus/minus

2016-10-12 Thread Bin.Cheng
On Wed, Oct 12, 2016 at 9:12 AM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 5:03 PM, Bin Cheng wrote: >> Hi, >> Given below test case, >> int foo (unsigned short a[], unsigned int x) >> { >> unsigned int i; >> for (i = 0; i < 1000; i++) >>

Re: [PATCH GCC][v2]Simplify alias check code generation in vectorizer

2016-09-26 Thread Bin.Cheng
On Mon, Sep 26, 2016 at 10:21 AM, Robin Dapp wrote: >> Comments added. Bootstrap and test, is it reasonable? > > This introduces an ICE on s390x with a Fortran testcase, because > of an assertion failure in tree_to_uhwi (DR_STEP (dr_a.dr)) for > DR_STEP (dr_a.dr) =

Re: [PATCH GCC][v2]Simplify alias check code generation in vectorizer

2016-09-22 Thread Bin.Cheng
On Wed, Sep 21, 2016 at 3:01 PM, Richard Biener wrote: > On Tue, Sep 20, 2016 at 5:25 PM, Bin Cheng wrote: >> Hi, >> I originally posted a patch improving code generation for alias check in >> vectorizer at

Re: [PATCH GCC 6/9]Simplify control flow graph for vectorized loop

2016-09-21 Thread Bin.Cheng
On Wed, Sep 14, 2016 at 5:43 PM, Jeff Law wrote: > On 09/14/2016 07:21 AM, Richard Biener wrote: >> >> On Tue, Sep 6, 2016 at 8:52 PM, Bin Cheng wrote: >>> >>> Hi, >>> This is the main patch improving control flow graph for vectorized loop. >>> It generally

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Bin.Cheng
On Fri, Sep 16, 2016 at 11:07 AM, Kyrill Tkachov <kyrylo.tkac...@foss.arm.com> wrote: > > On 16/09/16 11:05, Bin.Cheng wrote: >> >> On Fri, Sep 16, 2016 at 10:53 AM, Kyrill Tkachov >> <kyrylo.tkac...@foss.arm.com> wrote: >>> >>> On 16/09/16

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Bin.Cheng
On Fri, Sep 16, 2016 at 10:53 AM, Kyrill Tkachov <kyrylo.tkac...@foss.arm.com> wrote: > > On 16/09/16 10:50, Bin.Cheng wrote: >> >> On Fri, Sep 16, 2016 at 10:20 AM, Kyrill Tkachov >> <kyrylo.tkac...@foss.arm.com> wrote: >>> >>> On 16/09/16

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Bin.Cheng
On Fri, Sep 16, 2016 at 10:20 AM, Kyrill Tkachov wrote: > > On 16/09/16 10:02, Richard Biener wrote: >> >> On Fri, Sep 16, 2016 at 10:40 AM, Kyrill Tkachov >> wrote: >>> >>> Hi all, >>> >>> Currently the functions: >>> int f1(int x, int

Re: [PATCH GCC 9/9]Prove no-overflow in computation of LOOP_VINFO_NITERS and improve code generation

2016-09-07 Thread Bin.Cheng
On Wed, Sep 7, 2016 at 1:10 AM, kugan wrote: > Hi Bin, > > > On 07/09/16 04:54, Bin Cheng wrote: >> >> Hi, >> LOOP_VINFO_NITERS is computed as LOOP_VINFO_NITERSM1 + 1, which could >> overflow in loop niters' type. Vectorizer needs to generate more code >>

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-09-02 Thread Bin.Cheng
On Fri, Sep 2, 2016 at 3:46 PM, Yuri Rumyantsev wrote: > Hi Jeff, > > I am trying to reduce cost of repeated call of if-conversion for > epilogue vectorization. I'd like to clarify your recommendation - > should I design additional support for versioning in >

Re: [PATCH PR69848]Avoid not insn by inverting comparison code in vcond patterns

2016-08-16 Thread Bin.Cheng
On Tue, Aug 16, 2016 at 10:53 AM, James Greenhalgh wrote: > On Wed, Aug 10, 2016 at 04:00:16PM +, Bin Cheng wrote: >> Hi, >> This is a follow up patch for previous vcond patches. In previous ones, >> we rely on combiner to simplify "X = !Y; Z = X ? A : B" into "Z =

Re: [PATCH GCC]Resolve compilation time known alias checks in vectorizer

2016-08-12 Thread Bin.Cheng
On Tue, Aug 9, 2016 at 4:43 PM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Sat, Aug 6, 2016 at 9:20 PM, Andreas Schwab <sch...@linux-m68k.org> wrote: >> On Mi, Jul 13 2016, "Bin.Cheng" <amker.ch...@gmail.com> wrote: >> >>> Patch re-tested/a

<    1   2   3   4   5   6   7   8   9   10   >