https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88598
--- Comment #7 from rguenther at suse dot de <rguenther at suse dot de> --- On Thu, 3 Jan 2019, rsandifo at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88598 > > --- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> > --- > I think a general fix for this would involve tracking the set of > nonzero vector elements and adding a match.pd rule that uses that > to replace REDUC functions in which only one element of the > argument is nonzero. Yes. Or even replacing REDUC_PLUS <constants, single-non-constant> with a partial reduction over the constants plus the single non-constant element. But variable-length stuff is a bit awkward in match.pd.