Richard Biener <richard.guent...@gmail.com> writes: > On Mon, Jun 18, 2018 at 5:04 PM Richard Sandiford > <richard.sandif...@arm.com> wrote: >> >> When following the definitions of SSA names, some recognisers >> already cope with statements that have been replaced by patterns. >> This patch makes that happen automatically for users of >> type_conversion_p and vect_get_internal_def. It also adds >> a vect_look_through_pattern helper that can be used directly. >> >> The reason for doing this is that the main patch for PR85694 >> makes over_widening handle more general cases. These over-widened >> patterns can still be useful when matching later statements; >> e.g. an overwidened MULT_EXPR could be the input to a DOT_PROD_EXPR. >> >> The patch doesn't do anything with the STMT_VINFO_IN_PATTERN_P checks >> in vect_recog_over_widening_pattern or vect_recog_widen_shift_pattern >> since later patches rewrite them anyway. >> >> Doing this fixed an XFAIL in vect-reduc-dot-u16b.c. >> >> Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? > > Hmm. It seems to me that *def_stmt for vect_is_simple_use should > eventually be the pattern def given the vectype overload takes the > vectype from the pattern def already but oddly enough the > DEF_TYPE is taken from the non-pattern stmt. > > I wonder which callers look at def_stmt at all (and how...) > > I guess swapping the def_stmt and dt arguments and adding yet another > overload to remove all unused &def_stmt args might this easier to review... > > So - I'm suggesting to change vect_is_simple_use.
OK, I'll try that. Might end up being its own mini-series. :-) I'll post the next set of patches anyway since they don't depend on *how* this is fixed, just that it is. Thanks, Richard