> On Jan 24, 2024, at 18:40, Richard Biener <rguent...@suse.de> wrote: > > We can't support niters with may_be_zero when we end up with a > non-empty latch due to early exit peeling. At least not in > the simplistic way the vectorizer handles this now. Disallow > it again for exits that are not the last one. > > Bootstrap and regtest running on x86_64-unknown-linux-gnu. > > PR tree-optimization/113576 > * tree-vect-loop.cc (vec_init_loop_exit_info): Only allow > exits with may_be_zero niters when its the last one. > > * gcc.dg/vect/pr113576.c: New testcase. > --- > gcc/testsuite/gcc.dg/vect/pr113576.c | 157 +++++++++++++++++++++++++++ > gcc/tree-vect-loop.cc | 9 +- > 2 files changed, 164 insertions(+), 2 deletions(-) > create mode 100644 gcc/testsuite/gcc.dg/vect/pr113576.c > > diff --git a/gcc/testsuite/gcc.dg/vect/pr113576.c > b/gcc/testsuite/gcc.dg/vect/pr113576.c > new file mode 100644 > index 00000000000..da5ddb09e33 > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/vect/pr113576.c > @@ -0,0 +1,157 @@ > +/* { dg-do run } */ > +/* { dg-options "-O3" } */ > +/* { dg-additional-options "-march=skylake-avx512" } */
Please adjust the testcase; this fails on non-x86_64 targets, see [1] and [2]. [1] https://patchwork.sourceware.org/project/gcc/patch/20240124144159.51c503858...@sourceware.org/ [2] https://ci.linaro.org/job/tcwg_gcc_check--master-aarch64-precommit/4765/artifact/artifacts/artifacts.precommit/00-sumfiles/gcc.log.1.xz Thanks! -- Maxim Kuvyrkov https://www.linaro.org