This is the mail archive of the gcc@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: Is this a bug in doloop.c?


John Lu wrote:
in order for the loop to iterate N times.  Currently, if the
exit test is:
	(if_then_else (ge (match_operand:QI 0 "register_operand" "")
	                  (const_int 0))
the looping register is set to N-1.

The point of this code is to detect loops that exit when the iterator reaches -1. So checking for const1_rtx instead of const0_rtx makes no sense here.


However, looking at current code in the loop-doloop.c file, I see that there have been a number of changes. decrement_count has been replaced with increment_count, and it is now set to false here. This file has been largely rewritten.

It is likely that your problem is already fixed on mainline. However, I can't be sure of this, as you didn't give us a testcase, or much explanation of what was going wrong.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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