On Fri, Jan 31, 2014 at 09:41:59AM +0100, Richard Biener wrote:
> Is that because si and pattern_def_si point to the same stmts?  Then
> I'd prefer to do
> 
>   if (is_store)
>    {
>      ...
>      pattern_def_seq = NULL;
>    }
>  else if (!transform_pattern_stmt && gsi_end_p (pattern_def_si))
>    {
>      pattern_def_seq = NULL;
>      gsi_next (&si);
>    }

Yeah, I think stores can only appear at the end of patterns, so IMHO it should 
be
safe to just clear pattern_def_seq always in that case.  Right now the code
has continue; separately for STMT_VINFO_GROUPED_ACCESS (stmt_info) and
for !STMT_VINFO_GROUPED_ACCESS (stmt_info) stores, but I guess you should
just move them at the end of if (is_store) and clear pattern_def_seq there
before the continue.  Add gcc_assert (!transform_pattern_stmt); too?

        Jakub

Reply via email to