This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: About standard_iv_increment_position
Zdenek Dvorak wrote:
> > The first remark is that this function is not used in mainline nor in
> > autovect. It seems to me that the arguments of create_iv should be
> > computed using standard_iv_increment_position, thus some cleanup
> > changes should be considered to tree-loop-linear.c and to
> > tree-vectorizer.c.
>
> this indeed might be a good idea.
>
I'll prepare a patch for mainline.
> > The second remark is that standard_iv_increment_position will return a
> > block_stmt_iterator and a position that is invalid for verify_flow_info,
> > as shown in the following case that fails:
> >
> > if (_n_413 < N_60) goto <L5>; else goto <L23>;
> > ivtmp.1076_499 = ivtmp.1076_498 + 1;
>
> I don't think this can ever happen.
This occured during a bootstrap of gcc in autovect branch.
> The piece of code your patch
> changes is only executed with bsi in latch block. Latch block always
> has precisely one successor, and therefore it cannot end with
> conditional expression.
>
> This reasoning is a bit fragile, so the following might be better
>
> *insert_after = !last || !stmt_ends_bb_p (last);
>
Indeed this works. Thanks.