Re: Fix profile upate after vectorizer peeling

2023-08-04 Thread Richard Biener via Gcc-patches
On Fri, Aug 4, 2023 at 10:52 AM Jan Hubicka wrote: > > Hi, > so I found the problem. We duplicate multiple paths and end up with: > > ;; basic block 6, loop depth 0, count 365072224 (estimated locally, freq > 0.3400) > ;; prev block 12, next block 7, flags: (NEW, REACHABLE, VISITED) > ;;

Re: Fix profile upate after vectorizer peeling

2023-08-04 Thread Jan Hubicka via Gcc-patches
Hi, so I found the problem. We duplicate multiple paths and end up with: ;; basic block 6, loop depth 0, count 365072224 (estimated locally, freq 0.3400) ;; prev block 12, next block 7, flags: (NEW, REACHABLE, VISITED) ;; pred: 4 [never (guessed)] count:0 (estimated locally, freq

Re: Fix profile upate after vectorizer peeling

2023-08-04 Thread Jan Hubicka via Gcc-patches
> > > > A couple cycles ago I separated most of code to distinguish between the > > back and forward threaders. There is class jt_path_registry that is > > common to both, and {fwd,back}_jt_path_registry for the forward and > > backward threaders respectively. It's not perfect, but it's a start.

Re: Fix profile upate after vectorizer peeling

2023-08-04 Thread Richard Biener via Gcc-patches
On Thu, Aug 3, 2023 at 5:12 PM Aldy Hernandez wrote: > > > > On 8/3/23 16:29, Jeff Law wrote: > > > > > > On 8/3/23 08:23, Jan Hubicka wrote: > Jeff, an help would be appreciated here :) > > I will try to debug this. One option would be to disable branch > prediciton on

Re: Fix profile upate after vectorizer peeling

2023-08-03 Thread Aldy Hernandez via Gcc-patches
On 8/3/23 16:29, Jeff Law wrote: On 8/3/23 08:23, Jan Hubicka wrote: Jeff, an help would be appreciated here :) I will try to debug this.  One option would be to disable branch prediciton on vect_check for time being - it is not inlined anyway Not a lot of insight.  The backwards threader

Re: Fix profile upate after vectorizer peeling

2023-08-03 Thread Jeff Law
On 8/3/23 08:23, Jan Hubicka wrote: Jeff, an help would be appreciated here :) I will try to debug this. One option would be to disable branch prediciton on vect_check for time being - it is not inlined anyway Not a lot of insight. The backwards threader uses a totally different API for

Re: Fix profile upate after vectorizer peeling

2023-08-03 Thread Jan Hubicka via Gcc-patches
> > Jeff, an help would be appreciated here :) > > > > I will try to debug this. One option would be to disable branch > > prediciton on vect_check for time being - it is not inlined anyway > Not a lot of insight. The backwards threader uses a totally different API > for the CFG/SSA updates and

Re: Fix profile upate after vectorizer peeling

2023-08-03 Thread Jeff Law
On 8/3/23 04:13, Jan Hubicka wrote: Note most of the profile consistency checks FAIL when testing with -m32 on x86_64-unknown-linux-gnu ... For example vect-11.c has ;; basic block 4, loop depth 0, count 719407024 (estimated locally, freq 0.6700), maybe hot ;; Invalid sum of incoming

Re: Fix profile upate after vectorizer peeling

2023-08-03 Thread Jan Hubicka via Gcc-patches
> > > > Note most of the profile consistency checks FAIL when testing with -m32 on > > x86_64-unknown-linux-gnu ... > > > > For example vect-11.c has > > > > ;; basic block 4, loop depth 0, count 719407024 (estimated locally, > > freq 0.6700), maybe hot > > ;; Invalid sum of incoming counts

Re: Fix profile upate after vectorizer peeling

2023-08-03 Thread Jan Hubicka via Gcc-patches
> > Note most of the profile consistency checks FAIL when testing with -m32 on > x86_64-unknown-linux-gnu ... > > For example vect-11.c has > > ;; basic block 4, loop depth 0, count 719407024 (estimated locally, > freq 0.6700), maybe hot > ;; Invalid sum of incoming counts 708669602

Re: Fix profile upate after vectorizer peeling

2023-08-02 Thread Richard Biener via Gcc-patches
On Tue, Aug 1, 2023 at 12:15 PM Jan Hubicka via Gcc-patches wrote: > > Hi, > This patch fixes update after constant peeling in profilogue. We now reached > 0 profile > update bugs on tramp3d vectorizaiton and also on quite few testcases, so I am > enabling the > testuiste checks so we do not

Fix profile upate after vectorizer peeling

2023-08-01 Thread Jan Hubicka via Gcc-patches
Hi, This patch fixes update after constant peeling in profilogue. We now reached 0 profile update bugs on tramp3d vectorizaiton and also on quite few testcases, so I am enabling the testuiste checks so we do not regress again. Bootstrapped/regtested x86_64, comitted. Honza gcc/ChangeLog: