https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65930
--- Comment #23 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Rainer Orth from comment #21) > (In reply to Richard Biener from comment #19) > > Author: rguenth > > Date: Wed Oct 23 12:41:49 2019 > > New Revision: 277322 > > > > URL: https://gcc.gnu.org/viewcvs?rev=277322&root=gcc&view=rev > > Log: > > 2019-10-23 Richard Biener <rguent...@suse.de> > > > > PR tree-optimization/65930 > > * tree-vect-loop.c (check_reduction_path): Allow conversions > > that only change the sign. > > (vectorizable_reduction): Relax latch def stmts we handle further. > > > > * gcc.dg/vect/vect-reduc-2char-big-array.c: Adjust. > > * gcc.dg/vect/vect-reduc-2char.c: Likewise. > > * gcc.dg/vect/vect-reduc-2short.c: Likewise. > > * gcc.dg/vect/vect-reduc-dot-s8b.c: Likewise. > > * gcc.dg/vect/vect-reduc-pattern-2c.c: Likewise. > > This patch caused a couple of regressions on Solaris/SPARC (32 and 64-bit): > > +FAIL: gcc.dg/vect/vect-reduc-2char-big-array.c -flto -ffat-lto-objects > scan-tree-dump-times vect "vectorized 3 loops" 1 > +FAIL: gcc.dg/vect/vect-reduc-2char-big-array.c scan-tree-dump-times vect > "vectorized 3 loops" 1 > +FAIL: gcc.dg/vect/vect-reduc-2char.c -flto -ffat-lto-objects > scan-tree-dump-times vect "vectorized 3 loops" 1 > +FAIL: gcc.dg/vect/vect-reduc-2char.c scan-tree-dump-times vect "vectorized > 3 loops" 1 > +FAIL: gcc.dg/vect/vect-reduc-2short.c -flto -ffat-lto-objects > scan-tree-dump-times vect "vectorized 3 loops" 1 > +FAIL: gcc.dg/vect/vect-reduc-2short.c scan-tree-dump-times vect "vectorized > 3 loops" 1 > +FAIL: gcc.dg/vect/vect-reduc-dot-s8b.c -flto -ffat-lto-objects > scan-tree-dump-times vect "vectorized 1 loops" 1 > +FAIL: gcc.dg/vect/vect-reduc-dot-s8b.c scan-tree-dump-times vect > "vectorized 1 loops" 1 > +FAIL: gcc.dg/vect/vect-reduc-pattern-2c.c -flto -ffat-lto-objects > scan-tree-dump-times vect "vectorized 1 loops" 1 > +FAIL: gcc.dg/vect/vect-reduc-pattern-2c.c scan-tree-dump-times vect > "vectorized 1 loops" 1 > > I'm attaching the vect-reduc-2char-big-array.c dump as an example. OK, there's /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/vect/vect-reduc-2char-big-array.c:44:9: missed: not vectorized: relevant stmt not supported: min_47 = MIN_EXPR <_20, min_88>; looks like those XFAILs are not expected to pass within the constraints of the testcases (guess that was to be expected). There's vect_no_int_min_max to cover up I guess. For vect-reduc-dot-s8b.c I wonder why it detected the widen_mult pattern but failed vectorization (dump file?) Otherwise there's vect_widen_mult_qi_to_hi which sparc doesn't have. At least that was used in the vect-reduc-pattern-2c.c case. I'm going to install a patch.