On Mon, 26 Jul 2010, Revital1 Eres wrote:
> > Hello, > > Doloop optimization fails to be applied on the following kernel from > tescase sms-4.c with mainline (-r 162294) due to 'Possible infinite > iteration > case' message; taken from the loop2_doloop dump. (please see below). > With an older version of gcc (-r 146278) doloop succeeded to be applied > and I appreciate an explanation about the change of behavior. This may be due to changes in induction variable selection and the ability of loop2_doloop to discover number of iterations for different variants of IV selection (which is not trivial when 'i' variable is eliminated and loop boundary is expressed with pointer comparison). See PR32283 [1] audit trail for an example of a related problem that was discussed before. It is possible that something is missing in simplify-rtx.c so that 'infinite if' condition cannot be simplified and proven to be always false. Zdenek once had to improve simplify-rtx.c for this reason, as the audit trail shows. [1] http://gcc.gnu.org/PR32283 Hope that helps, Alexander