Hi Andre, on 2021/5/24 下午2:17, Andre Vieira (lists) via Gcc-patches wrote: > Hi, > > When vectorizing with --param vect-partial-vector-usage=1 the vectorizer uses > an unpredicated (all-true predicate for SVE) main loop and a predicated tail > loop. The way this was implemented seems to mean it re-uses the same > vector-mode for both loops, which means the tail loop isn't an actual loop > but only executes one iteration. > > This patch uses the knowledge of the conditions to enter an epilogue loop to > help come up with a potentially more restricive upper bound. > > Regression tested on aarch64-linux-gnu and also ran the testsuite using > '--param vect-partial-vector-usage=1' detecting no ICEs and no execution > failures. > > Would be good to have this tested for PPC too as I believe they are the main > users of the --param vect-partial-vector-usage=1 option. Can someone help me > test (and maybe even benchmark?) this on a PPC target? >
Thanks for doing this! I can test it on Power10 which enables this parameter by default, also evaluate its impact on SPEC2017 Ofast/unroll. Do you have any preference for the baseline commit? I'll use r12-0 if it's fine. BR, Kewen