https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65084
--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> --- On Fri, 20 Feb 2015, law at redhat dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65084 > > --- Comment #5 from Jeffrey A. Law <law at redhat dot com> --- Some of > the stuff you're doing in that patch matches what I was poking at as > well (for a different BZ). There's clearly much room for improvement > here and if we weren't in stage4, I'd be pushing harder on expanding > what these patterns do now rather than waiting. Note that for aggressive narrowing (which eventually makes sense for early GIMPLE) and for widening (which makes sense towards RTL expansion with the targets word_mode / PROMOTE_MODE in mind) having a separate pass that deals with the actual transform step (but re-using the matching from the match.pd code) makes sense - triggering the transform from forwprop via fold_stmt creates garbage that can confuse single-use tests (yeah, it's on my list of things to investigate on whether we can improve here in a somewhat generic way for GCC 6). As in this bugs summary - what are the cases where vectorization is bad because of the lack of widening? > I'm already of the mind that we're going to want to factor some of that > type testing so we're not repeating it in a half-dozen patterns. Yeah, that makes sense.