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: optimization/7130: miscompiled code for gcc-3.1 in powerpc linux with -funroll-all-loops


On Thu, Jul 11, 2002 at 05:21:57PM +0930, Alan Modra wrote:

> Index: gcc/doloop.c
> -      if (abs_inc != 1)
> -	diff = expand_simple_binop (GET_MODE (diff), PLUS,
> -				    diff, GEN_INT (abs_inc - 1),
> -				    diff, 1, OPTAB_LIB_WIDEN);
> +      diff = expand_simple_binop (GET_MODE (diff), PLUS,
> +				  diff, GEN_INT (abs_loop_inc - abs_inc),
> +				  diff, 1, OPTAB_LIB_WIDEN);

Small revision.  The above isn't wrong, but I should be using

      if (abs_loop_inc != abs_inc)
	diff = expand_simple_binop (GET_MODE (diff), PLUS,
				    diff, GEN_INT (abs_loop_inc - abs_inc),
				    diff, 1, OPTAB_LIB_WIDEN);

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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