https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77848
--- Comment #9 from rguenther at suse dot de <rguenther at suse dot de> --- On Fri, 4 Nov 2016, wschmidt at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77848 > > --- Comment #7 from Bill Schmidt <wschmidt at gcc dot gnu.org> --- > OK, I will try to get some machine time to do performance testing of the > existing patch as soon as possible. > > Here is the list of failures: > > > FAIL: gcc.dg/vect/bb-slp-cond-1.c -flto -ffat-lto-objects > > scan-tree-dump-times slp1 "basic block vectorized" 1 > > FAIL: gcc.dg/vect/bb-slp-cond-1.c scan-tree-dump-times slp1 "basic block > > vectorized" 1 > 66a69,76 > > FAIL: gcc.dg/vect/vect-cond-1.c -flto -ffat-lto-objects > > scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 1 > > FAIL: gcc.dg/vect/vect-cond-1.c scan-tree-dump-times vect "OUTER LOOP > > VECTORIZED" 1 > > FAIL: gcc.dg/vect/vect-cond-3.c -flto -ffat-lto-objects > > scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 1 > > FAIL: gcc.dg/vect/vect-cond-3.c scan-tree-dump-times vect "OUTER LOOP > > VECTORIZED" 1 > > FAIL: gcc.dg/vect/vect-cond-4.c -flto -ffat-lto-objects > > scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 1 > > FAIL: gcc.dg/vect/vect-cond-4.c scan-tree-dump-times vect "OUTER LOOP > > VECTORIZED" 1 > > FAIL: gcc.dg/vect/vect-cond-6.c -flto -ffat-lto-objects > > scan-tree-dump-times vect "OUTER LOOP VECTORIZED" 1 > > FAIL: gcc.dg/vect/vect-cond-6.c scan-tree-dump-times vect "OUTER LOOP > > VECTORIZED" 1 Ok, so that's outer loop vect not handling the if (LOOP_VECTORIZED ()) case -- if-conversion only handles innermost loops but the vectorizer handles a single outer loop. This means the if (LOOP_VECTORIZED ()) would need to be put on the outer loop or outer loop vectorization would need to handle it in some way. I think we already disable outer loop vectorization when sth forces LOOP_VECTORIZED () for if-conversion. I think "ignoring" LOOP_VECTORIZED and its associated CFG in outer loop vectorization and folding it away before transform might work... (we also fail to if-convert the "outer" loop btw). See vect_analyze_loop_form_1 for what loop form we expect for outer loop vectorization.