https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77848
--- Comment #20 from rguenther at suse dot de <rguenther at suse dot de> --- On Tue, 15 Nov 2016, wschmidt at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77848 > > --- Comment #19 from Bill Schmidt <wschmidt at gcc dot gnu.org> --- > I have a patch that solves this problem by always versioning loops when > vectorization is enabled, and also sets up if-conversion for outer loops so > that outer-loop vectorization can succeed as before. Surprisingly, this > didn't > require any changes to the vectorization code to pass the test suite, and I > verified a couple of examples to see that the expected vectorization was > occurring. Heh, that's surprising but all the better! > We still have these regressions: > > > 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 > > Richard, what are your current thoughts on this re: comment #6? I think we should go this route despite this particular regression. The loop should be vectorizable in loop vectorization and I promise to look at the regression. Note that in theory we can also dispatch to BB vectorization from loop vectorization when that failed to catch the vectorization of if-converted code. > I think I should probably submit the current patch for review despite the > regression, while we talk about the effect on SLP vectorization. I'll do this > tomorrow unless I hear otherwise. Yes, I think that's a good idea. Richard.