Zdenek Dvorak - Re: loop-iv bugfix (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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] |
- From: Zdenek Dvorak
- To: Bernd Schmidt <bernds_cb1 at t-online dot de>
- Cc: GCC Patches
- Date: Sun, 25 Feb 2007 19:10:56 +0100
- Subject: Re: loop-iv bugfix
- References: <45E068C3.9040408@t-online.de>
Hello,
This fixes a bug I discovered while working on the previous patch to improve upper bounds for the number of iterations. When searching backwards through the insns to simplify an expression, loop-iv keeps track of which registers have been altered, but it does not reliably take this information into account. Whenever a register that appears in the expression has been altered, we must abort the scan.
Bootstrapped & regression tested on i686-linux, as well as numerous times in our Blackfin tree. Committed as 122291.
this looks a bit conservative, but I guess it does not make sense to make this code more complicated unless someone comes with some testcase that would require it.
Index: loop-iv.c
--- loop-iv.c (revision 122288) +++ loop-iv.c (working copy) @@ -1811,6 +1811,8 @@ simplify_using_initial_values (struct lo FREE_REG_SET (altered); return; } + if (for_each_rtx (expr, altered_reg_used, altered)) + return;
FREE_REG_SET (altered); is missing here.
Zdenek
- Follow-Ups:
- Re: loop-iv bugfix
* From: Bernd Schmidt - Re: loop-iv bugfix
* From: Bernd Schmidt
- Re: loop-iv bugfix
- References:
- loop-iv bugfix
* From: Bernd Schmidt
- loop-iv bugfix
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |