Re: [V3 PATCH] Don't reduce estimated unrolled size for innermost loop.

2024-05-29 Thread Richard Biener
On Fri, May 24, 2024 at 9:29 AM liuhongt wrote: > > Update in V3: > > Since this was about vectorization can you instead add a testcase to > > gcc.dg/vect/ and check for > > vectorization to happen? > Move to vect/pr112325.c. > > > > I believe the if (unr_insn <= 0) check can go as well. > Removed

[V3 PATCH] Don't reduce estimated unrolled size for innermost loop.

2024-05-24 Thread liuhongt
Update in V3: > Since this was about vectorization can you instead add a testcase to > gcc.dg/vect/ and check for > vectorization to happen? Move to vect/pr112325.c. > > I believe the if (unr_insn <= 0) check can go as well. Removed. > as said, you want to do > > curolli = false; > > aft

Re: [V2 PATCH] Don't reduce estimated unrolled size for innermost loop at cunrolli.

2024-05-23 Thread Richard Biener
On Wed, May 22, 2024 at 7:07 AM liuhongt wrote: > > >> Hard to find a default value satisfying all testcases. > >> some require loop unroll with 7 insns increment, some don't want loop > >> unroll w/ 5 insn increment. > >> The original 2/3 reduction happened to meet all those testcases(or the > >>

Re: [V2 PATCH] Don't reduce estimated unrolled size for innermost loop at cunrolli.

2024-05-22 Thread Hongtao Liu
On Wed, May 22, 2024 at 1:07 PM liuhongt wrote: > > >> Hard to find a default value satisfying all testcases. > >> some require loop unroll with 7 insns increment, some don't want loop > >> unroll w/ 5 insn increment. > >> The original 2/3 reduction happened to meet all those testcases(or the > >>

[V2 PATCH] Don't reduce estimated unrolled size for innermost loop at cunrolli.

2024-05-21 Thread liuhongt
>> Hard to find a default value satisfying all testcases. >> some require loop unroll with 7 insns increment, some don't want loop >> unroll w/ 5 insn increment. >> The original 2/3 reduction happened to meet all those testcases(or the >> testcases are constructed based on the old 2/3). >> Can we d

Re: [PATCH] Don't reduce estimated unrolled size for innermost loop.

2024-05-20 Thread Richard Biener
On Tue, May 21, 2024 at 4:35 AM Hongtao Liu wrote: > > On Wed, May 15, 2024 at 5:24 PM Richard Biener > wrote: > > > > On Wed, May 15, 2024 at 4:15 AM Hongtao Liu wrote: > > > > > > On Mon, May 13, 2024 at 3:40 PM Richard Biener > > > wrote: > > > > > > > > On Mon, May 13, 2024 at 4:29 AM liuho

Re: [PATCH] Don't reduce estimated unrolled size for innermost loop.

2024-05-20 Thread Hongtao Liu
On Wed, May 15, 2024 at 5:24 PM Richard Biener wrote: > > On Wed, May 15, 2024 at 4:15 AM Hongtao Liu wrote: > > > > On Mon, May 13, 2024 at 3:40 PM Richard Biener > > wrote: > > > > > > On Mon, May 13, 2024 at 4:29 AM liuhongt wrote: > > > > > > > > As testcase in the PR, O3 cunrolli may preve

Re: [PATCH] Don't reduce estimated unrolled size for innermost loop.

2024-05-15 Thread Hongtao Liu
C -std=gnu++14 LP64 note (test for > > > > g++warnings, line 56) > > > > g++: g++.dg/warn/Warray-bounds-20.C -std=gnu++14 note (test for > > > > g++warnings, line 66) > > > > g++: g++.dg/warn/Warray-bounds-20.C -std=gnu++17 LP64 note (test for > > > > g++warnings, line 56) > > > > g++: g++.dg/wa

Re: [PATCH] Don't reduce estimated unrolled size for innermost loop.

2024-05-15 Thread Richard Biener
On Wed, May 15, 2024 at 4:15 AM Hongtao Liu wrote: > > On Mon, May 13, 2024 at 3:40 PM Richard Biener > wrote: > > > > On Mon, May 13, 2024 at 4:29 AM liuhongt wrote: > > > > > > As testcase in the PR, O3 cunrolli may prevent vectorization for the > > > innermost loop and increase register press

Re: [PATCH] Don't reduce estimated unrolled size for innermost loop.

2024-05-14 Thread Hongtao Liu
On Mon, May 13, 2024 at 3:40 PM Richard Biener wrote: > > On Mon, May 13, 2024 at 4:29 AM liuhongt wrote: > > > > As testcase in the PR, O3 cunrolli may prevent vectorization for the > > innermost loop and increase register pressure. > > The patch removes the 1/3 reduction of unr_insn for innermo

Re: [PATCH] Don't reduce estimated unrolled size for innermost loop.

2024-05-13 Thread Richard Biener
On Mon, May 13, 2024 at 4:29 AM liuhongt wrote: > > As testcase in the PR, O3 cunrolli may prevent vectorization for the > innermost loop and increase register pressure. > The patch removes the 1/3 reduction of unr_insn for innermost loop for UL_ALL. > ul != UR_ALL is needed since some small loop

[PATCH] Don't reduce estimated unrolled size for innermost loop.

2024-05-12 Thread liuhongt
As testcase in the PR, O3 cunrolli may prevent vectorization for the innermost loop and increase register pressure. The patch removes the 1/3 reduction of unr_insn for innermost loop for UL_ALL. ul != UR_ALL is needed since some small loop complete unrolling at O2 relies the reduction. Bootstrappe