"Kewen.Lin" <li...@linux.ibm.com> writes: > Hi Richard, > > on 2023/8/14 20:20, Richard Sandiford wrote: >> Thanks for the clean-ups. But... >> >> "Kewen.Lin" <li...@linux.ibm.com> writes: >>> Hi, >>> >>> Following Richi's suggestion [1], this patch is to move the >>> handlings on VMAT_GATHER_SCATTER in the final loop nest >>> of function vectorizable_load to its own loop. Basically >>> it duplicates the final loop nest, clean up some useless >>> set up code for the case of VMAT_GATHER_SCATTER, remove some >>> unreachable code. Also remove the corresponding handlings >>> in the final loop nest. >>> >>> Bootstrapped and regtested on x86_64-redhat-linux, >>> aarch64-linux-gnu and powerpc64{,le}-linux-gnu. >>> >>> [1] https://gcc.gnu.org/pipermail/gcc-patches/2023-June/623329.html >>> >>> Is it ok for trunk? >>> >>> BR, >>> Kewen >>> ----- >>> >>> gcc/ChangeLog: >>> >>> * tree-vect-stmts.cc (vectorizable_load): Move the handlings on >>> VMAT_GATHER_SCATTER in the final loop nest to its own loop, >>> and update the final nest accordingly. >>> --- >>> gcc/tree-vect-stmts.cc | 361 +++++++++++++++++++++++++---------------- >>> 1 file changed, 219 insertions(+), 142 deletions(-) >> >> ...that seems like quite a lot of +s. Is there nothing we can do to >> avoid the cut-&-paste? > > Thanks for the comments! I'm not sure if I get your question, if we > want to move out the handlings of VMAT_GATHER_SCATTER, the new +s seem > inevitable? Your concern is mainly about git blame history?
No, it was more that 219-142=77, so it seems like a lot of lines are being duplicated rather than simply being moved. (Unlike for VMAT_LOAD_STORE_LANES, which was even a slight LOC saving, and so was a clear improvement.) So I was just wondering if there was any obvious factoring-out that could be done to reduce the duplication. Thanks, Richard