[PATCH v2] rs6000: Use direct move for char/short vector CTOR [PR96933]

2020-09-09 Thread Kewen.Lin via Gcc-patches
Hi, As Segher's suggestion in the PR, for 128bit_direct_move, this new version leverages vector pack insns instead of vector perms with one control vector. The performance evaluation shows that it's on par with the previous version for char, while it's better than the previous for short. Bootstr

Re: [testsuite] Fix PR93935 to guard case under vect_hw_misalign

2020-03-10 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this patch, also request to backport to gcc9 after some burn-in time. BR, Kewen on 2020/2/26 下午2:17, Kewen.Lin wrote: > Hi, > > This patch is to apply the same fix as r267528 to another similar case > bb-slp-over-widen-2.c which requires misaligned vector access. &

[PATCH] Fix PR90332 by extending half size vector mode

2020-03-18 Thread Kewen.Lin via Gcc-patches
Hi, As PR90332 shows, the current scalar epilogue peeling for gaps elimination requires expected vec_init optab with two half size vector mode. On Power, we don't support vector mode like V8QI, so can't support optab like vec_initv16qiv8qi. But we want to leverage existing scalar mode like DI t

Re: [PATCH] Fix PR90332 by extending half size vector mode

2020-03-18 Thread Kewen.Lin via Gcc-patches
Hi Richi, Thanks for your comments. on 2020/3/18 下午6:39, Richard Biener wrote: > On Wed, Mar 18, 2020 at 11:06 AM Kewen.Lin wrote: >> >> Hi, >> >> As PR90332 shows, the current scalar epilogue peeling for gaps >> elimination requires expected vec_init optab

Re: [PATCH] Fix PR90332 by extending half size vector mode

2020-03-18 Thread Kewen.Lin via Gcc-patches
on 2020/3/18 下午6:40, Richard Biener wrote: > On Wed, Mar 18, 2020 at 11:39 AM Richard Biener > wrote: >> >> On Wed, Mar 18, 2020 at 11:06 AM Kewen.Lin wrote: >>> >>> Hi, >>> >>> As PR90332 shows, the current scalar epilogue peeling for gaps

[PATCH v2] Fix PR90332 by extending half size vector mode

2020-03-24 Thread Kewen.Lin via Gcc-patches
Hi, on 2020/3/18 下午11:10, Richard Biener wrote: > On Wed, Mar 18, 2020 at 2:56 PM Kewen.Lin wrote: >> >> Hi Richi, >> >> Thanks for your comments. >> >> on 2020/3/18 下午6:39, Richard Biener wrote: >>> On Wed, Mar 18, 2020 at 11:06 AM Kewen.Lin

Re: [PATCH 5/7 v6] vect: Support vector load/store with length in vectorizer

2020-07-07 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2020/7/2 下午1:20, Kewen.Lin via Gcc-patches wrote: > on 2020/7/1 下午11:17, Richard Sandiford wrote: >> "Kewen.Lin" writes: >>> on 2020/7/1 上午3:53, Richard Sandiford wrote: >>>> "Kewen.Lin" writes: [...] >> Hmm, OK. But in t

Re: [PATCH 5/7 v6] vect: Support vector load/store with length in vectorizer

2020-07-07 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2020/7/7 下午6:44, Richard Sandiford wrote: > "Kewen.Lin" writes: >> on 2020/7/2 下午1:20, Kewen.Lin via Gcc-patches wrote: >>> on 2020/7/1 下午11:17, Richard Sandiford wrote: >>>> "Kewen.Lin" writes: >>>>> on 202

Re: [PATCH 5/7 v6] vect: Support vector load/store with length in vectorizer

2020-07-08 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2020/7/7 下午6:15, Richard Sandiford wrote: > "Kewen.Lin" writes: >> Hi Richard, >> >> on 2020/7/1 下午11:17, Richard Sandiford wrote: >>> "Kewen.Lin" writes: >>>> on 2020/7/1 上午3:53, Richard Sandiford wrote: >>

[PATCH] vect/testsuite: Adjust dumping for fully masking decision

2020-07-08 Thread Kewen.Lin via Gcc-patches
Hi, As Richard S. suggested in the review of vector with length patch series, we can use one message on "partial vectors" instead of "fully with masking". This patch is to update the dumping string and related test cases. Bootstrapped/regtested on aarch64-linux-gnu. Is it ok for trunk? BR, Kew

[PATCH] vect: Enhance condition check to use partial vectors in vectorizable_condition

2020-07-08 Thread Kewen.Lin via Gcc-patches
Hi, This patch is derived from the review of vector with length patch series. The length-based partial vector approach doesn't support reduction so far, so we would like to disable vectorization with partial vectors explicitly for it in vectorizable_condition. Otherwise, it will cause some unexpe

Re: [PATCH] remove premature vect_verify_datarefs_alignment

2020-07-08 Thread Kewen.Lin via Gcc-patches
Hi Richi, on 2020/7/8 下午10:45, Richard Biener wrote: > This followup removes vect_verify_datarefs_alignment and its > premature cancellation of vectorization leaving the actual > decision whether alignment is supported to the functions > deciding whether we can vectorize a load or store. > > I'll

Re: [PATCH] remove premature vect_verify_datarefs_alignment

2020-07-08 Thread Kewen.Lin via Gcc-patches
on 2020/7/9 上午10:48, Kewen.Lin via Gcc-patches wrote: > Hi Richi, > > on 2020/7/8 下午10:45, Richard Biener wrote: >> This followup removes vect_verify_datarefs_alignment and its >> premature cancellation of vectorization leaving the actual >> decision whether al

Re: [PATCH 5/7 v6] vect: Support vector load/store with length in vectorizer

2020-07-10 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2020/7/8 下午8:50, Richard Sandiford wrote: > "Kewen.Lin" writes: >>> […] >>>> I tested the updated patch with this releasing, LOOP_VINFO_PEELING_FOR_GAPS >>>> part looks fine, but LOOP_VINFO_PEELING_FOR_ALIGNMENT caused one case to >

[PATCH 5/7 v7] vect: Support vector load/store with length in vectorizer

2020-07-10 Thread Kewen.Lin via Gcc-patches
Hi Richard, The new version v7 is attached which has addressed your review comments on v6. Could you have a further look? Many thanks in advance! Bootstrapped/regtested on aarch64-linux-gnu and powerpc64le-linux-gnu P9. Even with explicit vect-partial-vector-usage settings 1/2 on Power target,

[PATCH 7/7 v2] rs6000/testsuite: Vector with length test cases

2020-07-10 Thread Kewen.Lin via Gcc-patches
Hi, v2 changes: - Updated param from vect-with-length-scope to vect-partial-vector-usage - Add *-7*/*-8* to cover peeling alignment and gaps. All cases passed on powerpc64le-linux-gnu P9. BR, Kewen - gcc/testsuite/ChangeLog: * gcc.target/powerpc/p9-vec-length-1.h: New test.

Re: [PATCH] remove premature vect_verify_datarefs_alignment

2020-07-10 Thread Kewen.Lin via Gcc-patches
on 2020/7/9 下午7:22, Richard Biener wrote: > On Thu, 9 Jul 2020, Kewen.Lin wrote: > >> on 2020/7/9 上午10:48, Kewen.Lin via Gcc-patches wrote: >>> Hi Richi, >>> >>> on 2020/7/8 下午10:45, Richard Biener wrote: >>>> This followup removes ve

[PATCH] testsuite/rs6000: Add option to ignore vect cost model

2020-07-15 Thread Kewen.Lin via Gcc-patches
Hi, In my testing with cost tweaking for vector with length, I found two cases below didn't get the expected output. Since the expected instructions reply on the vectorization occurrence, we don't expect vectorization gets disabled by cost model. To make it not fragile, the fix is to force it wi

Re: [PATCH] testsuite/rs6000: Add option to ignore vect cost model

2020-07-16 Thread Kewen.Lin via Gcc-patches
Hi, on 2020/7/17 上午4:31, Segher Boessenkool wrote: > Hi! > > On Thu, Jul 16, 2020 at 02:51:23PM +0800, Kewen.Lin wrote: >> In my testing with cost tweaking for vector with length, I found >> two cases below didn't get the expected output. Since the expected &g

Re: [PATCH 5/7 v7] vect: Support vector load/store with length in vectorizer

2020-07-19 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2020/7/17 下午5:54, Richard Sandiford wrote: > Hi, > > Sorry for the slow review. > >> The new version v7 is attached which has addressed your review comments >> on v6. Could you have a further look? Many thanks in advance! >> >> Bootstrapped/regtested on aarch64-linux-gnu and pow

Re: [PATCH 7/7 v2] rs6000/testsuite: Vector with length test cases

2020-07-20 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2020/7/21 上午12:58, Segher Boessenkool wrote: > Hi! > > On Fri, Jul 10, 2020 at 06:07:16PM +0800, Kewen.Lin wrote: >> +/* { dg-do compile { target { powerpc*-*-* } && { lp64 && >> powerpc_p9vector_ok } } } */ > > Everyth

[PATCH] vect: Support vector with length cost modeling

2020-07-20 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to add the cost modeling for vector with length, it mainly follows what we generate for vector with length in functions vect_set_loop_controls_directly and vect_gen_len at the worst case. For Power, the length is expected to be in bits 0-7 (high bits), we have to model the cost

[PATCH v2] vect/rs6000: Support vector with length cost modeling

2020-07-21 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2020/7/21 下午3:57, Richard Biener wrote: > On Tue, Jul 21, 2020 at 7:52 AM Kewen.Lin wrote: >> >> Hi, >> >> This patch is to add the cost modeling for vector with length, >> it mainly follows what we generate for vector with length in >> fu

[PATCH] rs6000: Rename adjust_vectorization_cost

2020-07-21 Thread Kewen.Lin via Gcc-patches
Hi, This trivial patch is to rename adjust_vectorization_cost to adjust_vect_cost_per_stmt. Hope it's more meaningful, as well as to avoid the confusion between the possible to be landed function "adjust_vect_cost" and "adjust_vectorization_cost". Even without "adjust_vect_cost", I guess it's s

Re: [PATCH v2] vect/rs6000: Support vector with length cost modeling

2020-07-22 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2020/7/22 下午2:38, Richard Biener wrote: > On Wed, Jul 22, 2020 at 3:26 AM Kewen.Lin wrote: >> >> Hi Richard, >> >> on 2020/7/21 下午3:57, Richard Biener wrote: >>> On Tue, Jul 21, 2020 at 7:52 AM Kewen.Lin wrote: >>>> >>>&

[PATCH v3] vect/rs6000: Support vector with length cost modeling

2020-07-22 Thread Kewen.Lin via Gcc-patches
Hi Richard, Thanks for the review! on 2020/7/22 下午5:11, Richard Sandiford wrote: > "Kewen.Lin" writes: >> - else if (LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo)) >> -{ >> - peel_iters_prologue = 0; >> - peel_iters_epilogue = 0; >> +

Re: [PATCH] rs6000: Rename adjust_vectorization_cost

2020-07-22 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2020/7/22 下午4:26, Segher Boessenkool wrote: > Hi! > > On Wed, Jul 22, 2020 at 09:44:52AM +0800, Kewen.Lin wrote: >> This trivial patch is to rename adjust_vectorization_cost to >> adjust_vect_cost_per_stmt. Hope it's more meaningful, as well >> a

Re: [PATCH v3] vect/rs6000: Support vector with length cost modeling

2020-07-22 Thread Kewen.Lin via Gcc-patches
Hi, Sorry, please ignore the previously attached file, which isn't the latest one although almost are the same. The latest tested is attached here. Sorry for the inconvenience. BR, Kewen on 2020/7/22 下午11:48, Kewen.Lin via Gcc-patches wrote: > > It's a great idea, b

Refactor peel_iters_{pro,epi}logue cost model handlings

2020-07-26 Thread Kewen.Lin via Gcc-patches
Hi, As Richard S. suggested in the thread: https://gcc.gnu.org/pipermail/gcc-patches/2020-July/550633.html this patch is separated from the one of that thread, mainly to refactor the existing peel_iters_{pro,epi}logue cost model handlings. I've addressed Richard S.'s review comments there, more

Re: [PATCH v2] vect/rs6000: Support vector with length cost modeling

2020-07-26 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for the comments! on 2020/7/23 上午1:49, Segher Boessenkool wrote: > Hi! > > On Wed, Jul 22, 2020 at 09:26:39AM +0800, Kewen.Lin wrote: >> +/* For some target specific vectorization cost which can't be handled per >> stmt, >> + we check the req

[PATCH v4] vect/rs6000: Support vector with length cost modeling

2020-07-26 Thread Kewen.Lin via Gcc-patches
Hi Richard, Thanks for the review again! on 2020/7/25 上午12:21, Richard Sandiford wrote: > "Kewen.Lin" writes: > > Thanks, the rearrangement of the existing code looks good. Could you > split that and the new LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo) stuff >

Re: Refactor peel_iters_{pro,epi}logue cost model handlings

2020-07-28 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2020/7/27 下午9:10, Richard Sandiford wrote: > "Kewen.Lin" writes: >> Hi, >> >> As Richard S. suggested in the thread: >> >> https://gcc.gnu.org/pipermail/gcc-patches/2020-July/550633.html >> >> this patch is separated from the

Re: [PATCH v4] vect/rs6000: Support vector with length cost modeling

2020-07-28 Thread Kewen.Lin via Gcc-patches
Hi Richard, Thanks for the comments! on 2020/7/27 下午9:40, Richard Sandiford wrote: > "Kewen.Lin" writes: [snip] >> + bool niters_known_p = LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo); >> + bool need_iterate_p >> += (!LO

Re: [PATCH, rs6000] Add non-relative jump table support for 64bit rs6000

2020-07-28 Thread Kewen.Lin via Gcc-patches
Added more CCs. Kewen on 2020/7/28 下午1:25, HAO CHEN GUI via Gcc-patches wrote: > Hi, > > This patch adds non-relative jump table support for 64bit rs6000. It > implements ASM_OUTPUT_ADDR_VEC_ELT and corresponding expansion of jump table > instruction for 64bit rs6000. We want to put non-relati

Re: [PATCH v4] vect/rs6000: Support vector with length cost modeling

2020-07-31 Thread Kewen.Lin via Gcc-patches
Hi Richards, on 2020/7/31 下午7:20, Richard Biener wrote: > On Fri, Jul 31, 2020 at 1:03 PM Richard Sandiford > wrote: >> >> "Kewen.Lin" writes: >>>>> + bool niters_known_p = LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo); >>>>> +

Re: [PATCH v4] vect/rs6000: Support vector with length cost modeling

2020-07-31 Thread Kewen.Lin via Gcc-patches
on 2020/7/31 下午9:01, Richard Biener wrote: > On Fri, Jul 31, 2020 at 2:37 PM Kewen.Lin wrote: >> >> Hi Richards, >> >> on 2020/7/31 下午7:20, Richard Biener wrote: >>> On Fri, Jul 31, 2020 at 1:03 PM Richard Sandiford >>> wrote: >>>> >

Re: Refactor peel_iters_{pro,epi}logue cost model handlings

2020-07-31 Thread Kewen.Lin via Gcc-patches
on 2020/7/31 下午6:57, Richard Sandiford wrote: > "Kewen.Lin" writes: >> Hi Richard, >> >> on 2020/7/27 下午9:10, Richard Sandiford wrote: >>> "Kewen.Lin" writes: >>>> Hi, >>>> >>>> As Richard S. suggested in

[PATCH v5] vect/rs6000: Support vector with length cost modeling

2020-07-31 Thread Kewen.Lin via Gcc-patches
Hi Richard, New version v5 is attached. v5 main changes against v4: 1) use _stmt instead of _cnt to avoid confusion 2) factor out function vect_rgroup_iv_might_wrap_p 3) use generic scalar_stmt for min/max stmt Does this look better? Thanks in advance! BR, Kewen - gcc/ChangeLog:

[PATCH] vect: Skip epilogue loops for dbgcnt check [PR96451]

2020-08-05 Thread Kewen.Lin via Gcc-patches
Hi, As the PR shows, commit r11-2453 exposed one issue that vectorizer wants to vectorize the epilogue loop and leaves the if-cvt body there, but later dbgcnt check disables it, the left scalar mask_store statement cause ICE. As Richard pointed out in that PR, the dbgcnt is to count original scal

[PATCH] testsuite: Update some vect cases for partial vectors

2020-08-05 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to adjust some existing vectorization test cases to stay well with the newly introduced partial vector usages. Bootstrapped/regtested on aarch64-linux-gnu and powerpc64le-linux-gnu P9 (with explicit param vect-partial-vector-usage=1 and enablement on check_effective_target_vect_

Re: [PATCH v5] vect/rs6000: Support vector with length cost modeling

2020-08-05 Thread Kewen.Lin via Gcc-patches
on 2020/8/5 下午10:06, Segher Boessenkool wrote: > On Wed, Aug 05, 2020 at 08:27:57AM +0100, Richard Sandiford wrote: >> OK for the vectoriser parts with those changes, thanks. > > The rs6000 part is still fine as well. Thanks! > > Committed via r11-2586. Thanks all! BR, Kewen

Re: [PATCH] testsuite: Update some vect cases for partial vectors

2020-08-06 Thread Kewen.Lin via Gcc-patches
Hi Richard, Thanks for the review! on 2020/8/6 下午1:52, Richard Sandiford wrote: > "Kewen.Lin" writes: >> diff --git a/gcc/testsuite/gcc.dg/vect/slp-multitypes-11.c >> b/gcc/testsuite/gcc.dg/vect/slp-multitypes-11.c >> index 5200ed1cd94..da6fb12eb0d 100644 >>

[PATCH/RFC] options: Make --help= to emit values post-overrided

2020-08-06 Thread Kewen.Lin via Gcc-patches
Hi, When I was working to update patch as Richard's review comments here https://gcc.gnu.org/pipermail/gcc-patches/2020-August/551474.html, I noticed that the options "-Q --help=params" don't show the final values after target option overriding, instead it emits the default values in params.opt (w

Re: [PATCH/RFC] options: Make --help= to emit values post-overrided

2020-08-06 Thread Kewen.Lin via Gcc-patches
Hi Segher! Thanks for the comments! on 2020/8/7 上午6:04, Segher Boessenkool wrote: > Hi! > > On Thu, Aug 06, 2020 at 08:37:23PM +0800, Kewen.Lin wrote: >> When I was working to update patch as Richard's review comments >> here https://gcc.gnu.org/pipermail/gcc-patch

[PATCH v3] Fix PR90332 by extending half size vector mode

2020-03-26 Thread Kewen.Lin via Gcc-patches
Hi Richi, on 2020/3/25 下午4:25, Richard Biener wrote: > On Tue, Mar 24, 2020 at 9:30 AM Kewen.Lin wrote: >> >> Hi, >> >> The new version with refactoring has been attached. >> Bootstrapped/regtested on powerpc64le-linux-gnu (LE) P8 and P9. >> >> I

[PATCH] Fix PR94043 by making vect_live_op generate lc-phi

2020-03-30 Thread Kewen.Lin via Gcc-patches
Hi, As PR94043 shows, my commit r10-4524 exposed one issue in vectorizable_live_operation, which inserts one extra BB before the single exit, leading unexpected operand expansion and unexpected loop depth assertion. As Richi suggested, this patch is to teach vectorizable_live_operation to generat

[PATCH] Fix PR94401 by considering reverse overrun

2020-04-02 Thread Kewen.Lin via Gcc-patches
Hi, The commit r10-7415 brings scalar type consideration to eliminate epilogue peeling for gaps, but it exposed one problem that the current handling doesn't consider the memory access type VMAT_CONTIGUOUS_REVERSE, for which the overrun happens on low address side. This patch is to make the code

Re: [PATCH] Fix PR94401 by considering reverse overrun

2020-04-02 Thread Kewen.Lin via Gcc-patches
Hi, on 2020/4/2 下午4:28, Jakub Jelinek wrote: > Hi! > > On Thu, Apr 02, 2020 at 03:15:42PM +0800, Kewen.Lin via Gcc-patches wrote: > > Just formatting nits, not commenting on what the actual patch does. > >> --- a/gcc/tree-vect-stmts.c >> +++ b/gcc/tree-vect-s

Re: [PATCH] Fix PR94401 by considering reverse overrun

2020-04-02 Thread Kewen.Lin via Gcc-patches
on 2020/4/2 下午5:21, Richard Biener wrote: > On Thu, Apr 2, 2020 at 9:15 AM Kewen.Lin wrote: >> >> Hi, >> >> The commit r10-7415 brings scalar type consideration >> to eliminate epilogue peeling for gaps, but it exposed >> one problem that the current handlin

[PATCH] Fix PR94443 with gsi_insert_seq_before

2020-04-02 Thread Kewen.Lin via Gcc-patches
on 2020/4/2 上午6:51, H.J. Lu wrote: > > This caused: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94449 > Thanks for reporting this. The attached patch is to fix the stupid mistake by using gsi_insert_seq_before instead of gsi_insert_before. BTW, the regression testing on one x86_64 machin

[PATCH, testsuite] Fix PR94079 by respecting vect_hw_misalign

2020-04-08 Thread Kewen.Lin via Gcc-patches
Hi, This is another vect case which requires special handling with vect_hw_misalign. The alignment of the second part requires misaligned vector access supports. This patch is to adjust the related guard condition and comments. Verified it on ppc64-redhat-linux (Power7 BE). Is it ok for trunk?

[PATCH, vect] Check alignment for no peeling gaps handling

2020-04-10 Thread Kewen.Lin via Gcc-patches
Hi, This is one fix following Richi's comments here: https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542232.html I noticed the current half vector support for no peeling gaps handled some cases which never check the half size vector support. By further investigation, those cases are safe to

Re: [RFC] split pseudos during loop unrolling in RTL unroller

2020-04-15 Thread Kewen.Lin via Gcc-patches
on 2020/4/15 下午2:21, Richard Biener via Gcc-patches wrote: > On Wed, Apr 15, 2020 at 3:56 AM Jiufu Guo via Gcc-patches > wrote: >> >> Hi, >> >> As you may know, we have loop unroll pass in RTL which was introduced a few >> years ago, and works for a long time. Currently, this unroller is using th

Re: [PATCH, vect] Check alignment for no peeling gaps handling

2020-04-28 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping for this patch. https://gcc.gnu.org/pipermail/gcc-patches/2020-April/543701.html BR, Kewen on 2020/4/10 下午5:28, Kewen.Lin via Gcc-patches wrote: > Hi, > > This is one fix following Richi's comments here: > https://gcc.gnu.org/pipermail/gcc-patches/2020-March/5

[PATCH 3/4 V3 GCC11] IVOPTs Consider cost_step on different forms during unrolling

2020-05-12 Thread Kewen.Lin via Gcc-patches
Call estimate_unroll_factor, update consider_reg_offset_for_unroll_p. on 2020/2/25 下午5:48, Kewen.Lin wrote: > Hi, > > As the proposed hook changes, updated this with main changes: > 1) Check with addr_offset_valid_p instead. > 2) Check the 1st and the last use for the

Re: [PATCH 2/4 GCC11] Add target hook stride_dform_valid_p

2020-05-12 Thread Kewen.Lin via Gcc-patches
l BR, Kewen on 2020/3/3 下午8:25, Kewen.Lin wrote: > Hi Richard, > > Thanks for your comments! It's a good idea to use param due to the > flexibility. And yes, it sounds good to have more targets to try and > make it better. But I have a bit concern on turning it on by defau

Re: [PATCH 2/2] rs6000: tune loop size for cunroll at O2

2020-05-19 Thread Kewen.Lin via Gcc-patches
Hi Jeff, on 2020/5/20 上午11:58, Jiufu Guo via Gcc-patches wrote: > Hi, > > This patch check the size of a loop to be unrolled/peeled completely, > and set the limits to a number (24). This prevents large loop from > being unrolled, then avoid binary size increasing, and this limit keeps > perform

[PATCH 0/7] Support vector load/store with length

2020-05-25 Thread Kewen.Lin via Gcc-patches
Hi all, This patch set adds support for vector load/store with length, Power ISA 3.0 brings instructions lxvl/stxvl to perform vector load/store with length, it's good to be exploited for those cases we don't have enough stuffs to fill in the whole vector like epilogues. This support mainly refe

[PATCH 1/7] ifn/optabs: Support vector load/store with length

2020-05-25 Thread Kewen.Lin via Gcc-patches
gcc/ChangeLog: 2020-MM-DD Kewen Lin * doc/md.texi (lenload@var{m}@var{n}): Document. (lenstore@var{m}@var{n}): Likewise. * internal-fn.c (len_load_direct): New macro. (len_store_direct): Likewise. (expand_len_load_optab_fn): Likewise. (expand_len

[PATCH 2/7] rs6000: lenload/lenstore optab support

2020-05-25 Thread Kewen.Lin via Gcc-patches
gcc/ChangeLog: 2020-MM-DD Kewen Lin * config/rs6000/vsx.md (lenloaddi): New define_expand. (lenstoredi): Likewise. --- gcc/config/rs6000/vsx.md | 30 ++ 1 file changed, 30 insertions(+) diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vs

[PATCH 3/7] vect: Factor out codes for niters smaller than vf check

2020-05-25 Thread Kewen.Lin via Gcc-patches
gcc/ChangeLog: 2020-MM-DD Kewen Lin * tree-vect-loop.c (known_niters_smaller_than_vf): New function, factored out from ... (vect_analyze_loop_costing): ... here. --- gcc/tree-vect-loop.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletio

[PATCH 4/7] hook/rs6000: Add vectorize length mode for vector with length

2020-05-25 Thread Kewen.Lin via Gcc-patches
gcc/ChangeLog: 2020-MM-DD Kewen Lin * config/rs6000/rs6000.c (TARGET_VECTORIZE_LENGTH_MODE): New macro. * doc/tm.texi: Regenerate. * doc/tm.texi.in: New hook. * target.def: Likewise. --- gcc/config/rs6000/rs6000.c | 3 +++ gcc/doc/tm.texi| 6 +

[PATCH 5/7] vect: Support vector load/store with length in vectorizer

2020-05-25 Thread Kewen.Lin via Gcc-patches
gcc/ChangeLog 2020-MM-DD Kewen Lin * doc/invoke.texi (vect-with-length-scope): Document new option. * params.opt (vect-with-length-scope): New. * tree-vect-loop-manip.c (vect_set_loop_lens_directly): New function. (vect_set_loop_condition_len): Likewise.

[PATCH 6/7] ivopts: Add handlings for vector with length IFNs

2020-05-25 Thread Kewen.Lin via Gcc-patches
gcc/ChangeLog 2020-MM-DD Kewen Lin * tree-ssa-loop-ivopts.c (get_mem_type_for_internal_fn): Handle IFN_LEN_LOAD and IFN_LEN_STORE. (get_alias_ptr_type_for_ptr_address): Likewise. --- gcc/tree-ssa-loop-ivopts.c | 4 1 file changed, 4 insertions(+) diff --git a/g

[PATCH 7/7] rs6000/testsuite: Vector with length test cases

2020-05-25 Thread Kewen.Lin via Gcc-patches
gcc/testsuite/ChangeLog 2020-MM-DD Kewen Lin * gcc.target/powerpc/p9-vec-length-1.h: New test. * gcc.target/powerpc/p9-vec-length-2.h: New test. * gcc.target/powerpc/p9-vec-length-3.h: New test. * gcc.target/powerpc/p9-vec-length-4.h: New test. * gcc.tar

Re: [PATCH 0/7] Support vector load/store with length

2020-05-26 Thread Kewen.Lin via Gcc-patches
Hi Richi, on 2020/5/26 下午3:12, Richard Biener wrote: > On Tue, 26 May 2020, Kewen.Lin wrote: > >> Hi all, >> >> This patch set adds support for vector load/store with length, Power >> ISA 3.0 brings instructions lxvl/stxvl to perform vector load/store with >&g

Re: [PATCH 0/7] Support vector load/store with length

2020-05-26 Thread Kewen.Lin via Gcc-patches
on 2020/5/26 下午5:44, Richard Biener wrote: > On Tue, 26 May 2020, Kewen.Lin wrote: > >> Hi Richi, >> >> on 2020/5/26 下午3:12, Richard Biener wrote: >>> On Tue, 26 May 2020, Kewen.Lin wrote: >>> >>>> Hi all, >>>> >>>>

Re: [PATCH 5/7] vect: Support vector load/store with length in vectorizer

2020-05-27 Thread Kewen.Lin via Gcc-patches
Hi Richard, Thanks for your comments! on 2020/5/26 下午8:49, Richard Sandiford wrote: > "Kewen.Lin" writes: >> @@ -626,6 +645,12 @@ public: >>/* True if have decided to use a fully-masked loop. */ >>bool fully_masked_p; >> >> + /* Records

Re: [PATCH 0/7] Support vector load/store with length

2020-05-27 Thread Kewen.Lin via Gcc-patches
on 2020/5/27 下午3:25, Richard Biener wrote: > On Tue, 26 May 2020, Segher Boessenkool wrote: > >> Hi! >> >> On Tue, May 26, 2020 at 01:29:30PM +0100, Richard Sandiford wrote: >>> FWIW, I agree adding .LEN_LOAD and .LEN_STORE seems like a good >>> approach. I think it'll be more maintainable in the

Re: [PATCH 5/7] vect: Support vector load/store with length in vectorizer

2020-05-27 Thread Kewen.Lin via Gcc-patches
on 2020/5/27 下午6:02, Richard Sandiford wrote: > "Kewen.Lin" writes: >> Hi Richard, >> >> Thanks for your comments! >> >> on 2020/5/26 锟斤拷锟斤拷8:49, Richard Sandiford wrote: >>> "Kewen.Lin" writes: >>>> @@ -626,6 +64

Ping^1 [PATCH 2/4 V3] Add target hook stride_dform_valid_p

2020-05-27 Thread Kewen.Lin via Gcc-patches
! Kewen on 2020/5/13 下午1:50, Kewen.Lin via Gcc-patches wrote: > Hi, > > I'd like to ping this patch as well as its sblings. Thanks in advance. > > 1/4 v3 https://gcc.gnu.org/pipermail/gcc-patches/2020-February/540171.html > 2/4 v3 https://gcc.gnu.org/pipermail/gcc-patches/202

[PATCH 0/4] IVOPTs consider step cost for different forms when unrolling

2020-05-28 Thread Kewen.Lin via Gcc-patches
Hi, This is one repost and you can refer to the original series via https://gcc.gnu.org/pipermail/gcc-patches/2020-January/538360.html. As we discussed in the thread https://gcc.gnu.org/ml/gcc-patches/2020-01/msg00196.html Original: https://gcc.gnu.org/ml/gcc-patches/2020-01/msg00104.html, I'm w

[PATCH 1/4] unroll: Add middle-end unroll factor estimation

2020-05-28 Thread Kewen.Lin via Gcc-patches
gcc/ChangeLog 2020-MM-DD Kewen Lin * cfgloop.h (struct loop): New field estimated_unroll. * tree-ssa-loop-manip.c (decide_unroll_const_iter): New function. (decide_unroll_runtime_iter): Likewise. (decide_unroll_stupid): Likewise. (estimate_unroll_factor

[PATCH 2/4] param: Introduce one param to control ivopts reg-offset consideration

2020-05-28 Thread Kewen.Lin via Gcc-patches
gcc/ChangeLog 2020-MM-DD Kewen Lin * doc/invoke.texi (iv-consider-reg-offset-for-unroll): Document new option. * params.opt (iv-consider-reg-offset-for-unroll): New. * config/s390/s390.c (s390_option_override_internal): Disable parameter iv-consider-reg-offset

[PATCH 3/4] ivopts: Consider cost_step on different forms during unrolling

2020-05-28 Thread Kewen.Lin via Gcc-patches
gcc/ChangeLog 2020-MM-DD Kewen Lin * tree-ssa-loop-ivopts.c (struct iv_group): New field reg_offset_p. (struct iv_cand): New field reg_offset_p. (struct ivopts_data): New field consider_reg_offset_for_unroll_p. (dump_groups): Dump group with reg_offset_p.

Re: [PATCH 3/4] ivopts: Consider cost_step on different forms during unrolling

2020-06-01 Thread Kewen.Lin via Gcc-patches
Hi Richard, Thanks for the comments! on 2020/6/2 上午1:59, Richard Sandiford wrote: > Could you go into more detail about this choice of cost calculation? > It looks like we first calculate per-group flags, which are true only if > the unrolled offsets are valid for all uses in the group. Then we

[PATCH 5/7 v3] vect: Support vector load/store with length in vectorizer

2020-06-02 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2020/5/29 下午4:32, Richard Sandiford wrote: > "Kewen.Lin" writes: >> on 2020/5/27 下午6:02, Richard Sandiford wrote: >>> "Kewen.Lin" writes: >>>> Hi Richard, >>>> Snip ... >> >> Thanks a lot for yo

Re: [PATCH 3/4] ivopts: Consider cost_step on different forms during unrolling

2020-06-02 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2020/6/2 下午3:14, Richard Sandiford wrote: > "Kewen.Lin" writes: >> Hi Richard, >> >> Thanks for the comments! >> >> on 2020/6/2 上午1:59, Richard Sandiford wrote: >>> Could you go into more detail about this choice of cost calcula

Re: [PATCH 0/4] IVOPTs consider step cost for different forms when unrolling

2020-06-02 Thread Kewen.Lin via Gcc-patches
Hi Richi, on 2020/6/2 下午7:38, Richard Biener wrote: > On Thu, 28 May 2020, Kewen.Lin wrote: > >> Hi, >> >> This is one repost and you can refer to the original series >> via https://gcc.gnu.org/pipermail/gcc-patches/2020-January/538360.html. >> >&

Re: [PATCH 5/7 v3] vect: Support vector load/store with length in vectorizer

2020-06-02 Thread Kewen.Lin via Gcc-patches
Hi Richard, Thanks a lot for your great comments! on 2020/6/2 下午7:50, Richard Sandiford wrote: > "Kewen.Lin" writes: >> Hi Richard, >> >> on 2020/5/29 下午4:32, Richard Sandiford wrote: >>> "Kewen.Lin" writes: >>>> on 2020/5

Re: [PATCH 0/4] IVOPTs consider step cost for different forms when unrolling

2020-06-03 Thread Kewen.Lin via Gcc-patches
on 2020/6/3 下午3:07, Richard Biener wrote: > On Wed, 3 Jun 2020, Kewen.Lin wrote: > >> Hi Richi, >> >> on 2020/6/2 下午7:38, Richard Biener wrote: >>> On Thu, 28 May 2020, Kewen.Lin wrote: >>> >>>> Hi, >>>> >>>&g

Re: [PATCH 0/4] IVOPTs consider step cost for different forms when unrolling

2020-06-03 Thread Kewen.Lin via Gcc-patches
on 2020/6/3 下午5:27, Richard Biener wrote: > On Wed, 3 Jun 2020, Kewen.Lin wrote: > >> on 2020/6/3 下午3:07, Richard Biener wrote: >>> On Wed, 3 Jun 2020, Kewen.Lin wrote: >>> >>>> Hi Richi, >>>> snip ... >>>>> >>>>

Re: [PATCH] rs6000: Use subreg for QI/HI vector init

2020-12-14 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for the review! on 2020/12/15 上午2:51, Segher Boessenkool wrote: > Hi! > > On Wed, Dec 02, 2020 at 05:44:24PM +0800, Kewen.Lin wrote: >> This patch is to use paradoxical subreg instead of >> zero_extend for promoting QI/HI to SI/DI when we >> want t

Re: [PATCH] rs6000: Use subreg for QI/HI vector init

2020-12-16 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2020/12/15 下午10:40, Segher Boessenkool wrote: > Hi Ke Wen, > > On Tue, Dec 15, 2020 at 03:53:29PM +0800, Kewen.Lin wrote: >> on 2020/12/15 上午2:51, Segher Boessenkool wrote: >>> On Wed, Dec 02, 2020 at 05:44:24PM +0800, Kewen.Lin wrote: >>>&

Re: Libcody breaks configure

2020-12-16 Thread Kewen.Lin via Gcc-patches
on 2020/12/16 下午2:35, Stott Graham via Gcc-patches wrote: > If any ---checking options used > The related PR PR98311[1] has been filed by David. BR, Kewen [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98311

[PATCH/RFC] combine: Tweak the condition of last_set invalidation

2020-12-16 Thread Kewen.Lin via Gcc-patches
Hi, When I was investigating unsigned int vec_init issue on Power, I happened to find there seems something we can enhance in how combine pass invalidate last_set (set last_set_invalid nonzero). Currently we have the check: if (!insn || (value && rsp->last_set_table_tick >= label

Re: Change to gcc/testsuite/go.test/test rejected by ChangeLog checker

2020-12-16 Thread Kewen.Lin via Gcc-patches
Hi Ian, on 2020/12/16 上午7:53, Ian Lance Taylor via Gcc-patches wrote: > On Tue, Dec 15, 2020 at 3:51 PM Ian Lance Taylor wrote: >> >> On Tue, Dec 15, 2020 at 3:43 PM Ian Lance Taylor wrote: >>> >>> I'm trying to commit a change that adds a bunch of new files to >>> gcc/testsuite/go.test/test. I

PING^6 [PATCH 1/4] unroll: Add middle-end unroll factor estimation

2020-12-16 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping^6 for: https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546698.html BR, Kewen on 2020/11/19 下午1:50, Kewen.Lin via Gcc-patches wrote: > Hi, > > Gentle ping^5 for: > > https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546698.html > > BR, > Kewen

Re: Change to gcc/testsuite/go.test/test rejected by ChangeLog checker

2020-12-16 Thread Kewen.Lin via Gcc-patches
on 2020/12/17 上午11:26, Ian Lance Taylor wrote: > On Wed, Dec 16, 2020 at 6:54 PM Kewen.Lin wrote: >> >> on 2020/12/16 上午7:53, Ian Lance Taylor via Gcc-patches wrote: >>> On Tue, Dec 15, 2020 at 3:51 PM Ian Lance Taylor wrote: >>>> >>>> On Tue,

[PATCH] ira: Skip some pseudos in move_unallocated_pseudos

2020-12-22 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to make move_unallocated_pseudos consistent to what we have in function find_moveable_pseudos, where we record the original pseudo into pseudo_replaced_reg only if validate_change succeeds with newreg. To ensure every unallocated pseudo in move_unallocated_pseudos has expected i

[PATCH] rs6000: Use rldimi for vec init instead of shift + ior

2020-12-22 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to make unsigned int vector init go with rldimi to merge two integers instead of shift and ior. I tried to use nonzero_bits in md file to make it more general, but the testing shows it isn't doable. The reason is that some passes would replace some pseudos with other pseudos an

Re: [PATCH] ira: Skip some pseudos in move_unallocated_pseudos

2020-12-22 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2020/12/22 下午9:55, Segher Boessenkool wrote: > Hi! > > Just a dumb formatting comment: > > On Tue, Dec 22, 2020 at 04:05:39PM +0800, Kewen.Lin wrote: >> This patch is to make move_unallocated_pseudos consistent >> to what we have in function find

[PATCH] sccvn: Consider def BB in rpo_vn_valueize [PR98464]

2020-12-30 Thread Kewen.Lin via Gcc-patches
Hi, As PR98464 shows, this patch is to make rpo_vn_valueize consider the definition basic block of name, to sync with what we do in function eliminate_stmt. Bootstrapped/regtested on powerpc64le-linux-gnu P9. Full SPEC2017 build/run passed on P9. BR, Kewen gcc/ChangeLog: PR tree-optim

Re: [PATCH] sccvn: Consider def BB in rpo_vn_valueize [PR98464]

2021-01-03 Thread Kewen.Lin via Gcc-patches
on 2020/12/31 下午6:01, Richard Biener wrote: > On December 31, 2020 8:02:37 AM GMT+01:00, "Kewen.Lin" > wrote: >> Hi, >> >> As PR98464 shows, this patch is to make rpo_vn_valueize >> consider the definition basic block of name, to sync >&

Re: [PATCH] ira: Skip some pseudos in move_unallocated_pseudos

2021-01-04 Thread Kewen.Lin via Gcc-patches
Hi Jeff, on 2021/1/5 上午7:13, Jeff Law wrote: > > > On 12/22/20 11:40 PM, Kewen.Lin via Gcc-patches wrote: >> Hi Segher, >> >> on 2020/12/22 下午9:55, Segher Boessenkool wrote: >>> Hi! >>> >>> Just a dumb formatting comment: >>>

Re: [PATCH] ira: Skip some pseudos in move_unallocated_pseudos

2021-01-05 Thread Kewen.Lin via Gcc-patches
on 2021/1/6 上午2:19, Jeff Law wrote: > > > On 1/4/21 7:36 PM, Kewen.Lin wrote: >> Hi Jeff, >> >> on 2021/1/5 上午7:13, Jeff Law wrote: >>> >>> On 12/22/20 11:40 PM, Kewen.Lin via Gcc-patches wrote: >>>> Hi Segher, >>>> >>&g

PING^1 [PATCH] combine: zeroing cost for new copies

2021-01-13 Thread Kewen.Lin via Gcc-patches
Hi, I'd like to gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2020-December/561413.html BR, Kewen on 2020/12/9 下午5:49, Kewen.Lin via Gcc-patches wrote: > Hi, > > This patch is to treat those new pseudo-to-pseudo copies > after hard-reg-to-pseudo-copy as

PING^1 [PATCH/RFC] combine: Tweak the condition of last_set invalidation

2021-01-13 Thread Kewen.Lin via Gcc-patches
Hi, I'd like to gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2020-December/562015.html BR, Kewen on 2020/12/16 下午4:49, Kewen.Lin via Gcc-patches wrote: > Hi, > > When I was investigating unsigned int vec_init issue on Power, > I happened to find there seems

PING^1 [PATCH] rs6000: Use rldimi for vec init instead of shift + ior

2021-01-13 Thread Kewen.Lin via Gcc-patches
Hi, I'd like to gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2020-December/562407.html BR, Kewen on 2020/12/22 下午4:08, Kewen.Lin via Gcc-patches wrote: > Hi, > > This patch is to make unsigned int vector init go with > rldimi to merge two integers instead

PING^7 [PATCH 1/4] unroll: Add middle-end unroll factor estimation

2021-01-13 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping^7 for: https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546698.html BR, Kewen on 2020/12/17 上午10:58, Kewen.Lin via Gcc-patches wrote: > Hi, > > Gentle ping^6 for: > > https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546698.html > > BR, > Kewen &

<    9   10   11   12   13   14   15   16   17   >