This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unsafe givs & check_ext_dependent_givs


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]