Re: [PATCH] Loop splitting breaks with loops of pointer type

2017-03-08 Thread Richard Biener
On Wed, Mar 8, 2017 at 11:53 AM, Andrew Haley wrote: > Loop splitting is fine when the control variable is of integer type, > but when it is a pointer type the upper bound of the new loop is > calculated incorrectly. > The calculation should be guard_init + (end-beg), but instead we do > guard_ini

[PATCH] Loop splitting breaks with loops of pointer type

2017-03-08 Thread Andrew Haley
Loop splitting is fine when the control variable is of integer type, but when it is a pointer type the upper bound of the new loop is calculated incorrectly. The calculation should be guard_init + (end-beg), but instead we do guard_init - (end-beg). Fixed thusly. Bootstrapped, regtested. OK? An