This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Unsafe givs & check_ext_dependent_givs
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 19 Sep 2003 15:13:00 +0100
- Subject: Re: Unsafe givs & check_ext_dependent_givs
- References: <wvnllslz18r.fsf@talisman.cambridge.redhat.com>
Richard Sandiford <rsandifo@redhat.com> writes:
> + /* Handle the special case in which MAXIMUM is the largest
> + unsigned HOST_WIDE_INT and INITIAL is 0. */
> + if (maximum + 1 == initial)
> + span = LOOP_INFO (loop)->n_iterations * delta;
> + else
> + span = maximum + 1 - initial;
Gah! This should just be:
span = maximum - initial;
since the biv might be used after the final increment.
Would the patch be OK with that change?