Re: More aggressive threading causing loop-interchange-9.c regression

2021-09-10 Thread Aldy Hernandez via Gcc-patches
I think things are clear enough to propose a patch. Thanks for everyone's input. I have added some comments and tweaked Michael's patch to include the final BB where we're threading to, in the check. Without this last check, we fail in tree-ssa/cunroll-15.c because the latch becomes pollute

Re: More aggressive threading causing loop-interchange-9.c regression

2021-09-10 Thread Michael Matz via Gcc-patches
Hi, On Fri, 10 Sep 2021, Aldy Hernandez via Gcc-patches wrote: > } > + > + /* Threading through a non-empty latch would cause code to be added "through an *empty* latch". The test in code is correct, though. And for the before/after loops flag you added: we have a cfun->curr_properties

Re: More aggressive threading causing loop-interchange-9.c regression

2021-09-10 Thread Aldy Hernandez via Gcc-patches
On 9/10/21 3:16 PM, Michael Matz wrote: Hi, On Fri, 10 Sep 2021, Aldy Hernandez via Gcc-patches wrote: } + + /* Threading through a non-empty latch would cause code to be added "through an *empty* latch". The test in code is correct, though. Whoops. And for the before/after lo

Re: More aggressive threading causing loop-interchange-9.c regression

2021-09-10 Thread Michael Matz via Gcc-patches
Hello, On Fri, 10 Sep 2021, Aldy Hernandez via Gcc-patches wrote: > Like this? Yep, but I can't approve. Ciao, Michael.

Re: More aggressive threading causing loop-interchange-9.c regression

2021-09-10 Thread Jeff Law via Gcc-patches
On 9/10/2021 7:53 AM, Aldy Hernandez via Gcc-patches wrote: On 9/10/21 3:16 PM, Michael Matz wrote: Hi, On Fri, 10 Sep 2021, Aldy Hernandez via Gcc-patches wrote:   } + +  /* Threading through a non-empty latch would cause code to be added "through an *empty* latch".  The test in c

Re: More aggressive threading causing loop-interchange-9.c regression

2021-09-13 Thread Christophe Lyon via Gcc-patches
On Fri, Sep 10, 2021 at 6:32 PM Jeff Law via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > > > On 9/10/2021 7:53 AM, Aldy Hernandez via Gcc-patches wrote: > > > > > > On 9/10/21 3:16 PM, Michael Matz wrote: > >> Hi, > >> > >> On Fri, 10 Sep 2021, Aldy Hernandez via Gcc-patches wrote: > >> > >>>

Re: More aggressive threading causing loop-interchange-9.c regression

2021-09-13 Thread Aldy Hernandez via Gcc-patches
On Mon, Sep 13, 2021 at 1:49 PM Christophe Lyon wrote: > This last test now fails on aarch64: > FAIL: gcc.dg/tree-ssa/ssa-dom-thread-7.c scan-tree-dump thread3 "Jumps > threaded: 8" > > Can you check? These rather large tests checking for some random number of jump threads are very annoying.