On Mon, 26 Nov 2018, Jakub Jelinek wrote: > On Mon, Nov 26, 2018 at 04:36:26PM +0100, Richard Biener wrote: > > > > With the relatex outer loop reduction support we need to avoid picking > > up a different nested cycles reduction def. That's easy given we > > record the PHI we are looking at - almost, at least. > > Thanks for fixing it. Just a nit, I guess the testcase could very well be > in g++.dg/vect/ or similar and just use -fopenmp-simd option instead of > -fopenmp, then the runtime library isn't needed nor being linked in.
Ah, forgot about that. I ended up moving it to libgomp because g++.dg/gomp isn't set up to find libgomp.spec or the library... I'll try moving it back using -fopenmp-simd. Richard. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. > > > > Richard. > > > > 2018-11-26 Richard Biener <rguent...@suse.de> > > > > PR tree-optimization/88182 > > * tree-vect-loop.c (vectorizable_reduction): Pick up single > > correct reduc_def_info. > > * tree-vect-slp.c (vect_analyze_slp_instance): Set > > STMT_VINFO_REDUC_DEF of the first stmt. > > > > libgomp/ > > * testsuite/libgomp.c++/pr88182.C: New testcase. > > Jakub