[patch] for PR19103

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Tue Dec 28 10:31:00 GMT 2004


Hello,

this PR is caused by a typo in my patch for PR 19001 (it causes
paradoxical exit conditions to be considered, and since we cannot
handle them properly, invalid number of iterations of a loop derived).

Bootstrapped & regtested on ppc and i686 (with -funroll-loops) and
commited as obvious.

Zdenek

	PR rtl-optimization/19103
	* loop-iv.c (iv_number_of_iterations): Fix typo.

Index: loop-iv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop-iv.c,v
retrieving revision 2.25
diff -c -3 -p -r2.25 loop-iv.c
*** loop-iv.c	18 Dec 2004 20:14:24 -0000	2.25
--- loop-iv.c	27 Dec 2004 23:52:38 -0000
*************** iv_number_of_iterations (struct loop *lo
*** 2132,2138 ****
        if (iv0.step == const0_rtx)
  	step_val = -INTVAL (iv1.step);
        else
! 	step_val = INTVAL (iv1.step);
  
        /* Ignore loops of while (i-- < 10) type.  */
        if (step_val < 0)
--- 2132,2138 ----
        if (iv0.step == const0_rtx)
  	step_val = -INTVAL (iv1.step);
        else
! 	step_val = INTVAL (iv0.step);
  
        /* Ignore loops of while (i-- < 10) type.  */
        if (step_val < 0)



More information about the Gcc-patches mailing list