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: Fix buglet in previous mechanical loop.c change


On Thu, Jul 15, 2004 at 08:55:01AM -0600, Jeffrey A Law wrote:
> The recent change to use various predicates instead of explicitly
> testing for suitable rtx codes had a minor flaw.  Consider this
> change fragment from loop.c:
> 
> !   if (GET_CODE (p) == INSN || GET_CODE (p) == JUMP_INSN
> !       || GET_CODE (p) == CODE_LABEL)

> !   if (INSN_P (p))

> In particular note that we no longer call update_giv_derive if P is a
> CODE_LABEL.
> 
> This can cause the loop optimizer to incorrectly reduce a GIV when it's
> BIV is conditionally incremented.

And you changed this to:

> !   if (INSN_P (p) || LABEL_P (p))

This now accepts CALL_INSN, which it didn't used to.  Was that a bug in
the old code?

-- 
Daniel Jacobowitz


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