This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix PR34916, 35519 Combine (Dataflow merge regression.)
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Andy H" <hutchinsonandy at aim dot com>
- Cc: gcc-patches at gcc dot gnu dot org, steven at gcc dot gnu dot org
- Date: Tue, 18 Mar 2008 22:42:01 +0100
- Subject: Re: Fix PR34916, 35519 Combine (Dataflow merge regression.)
- References: <47E035AB.5010904@aim.com>
On Tue, Mar 18, 2008 at 10:35 PM, Andy H <hutchinsonandy@aim.com> wrote:
> This patch fixes combine bugs. Now cleaned up with Change log entry.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34916
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35519
>
> which appeared after dataflow merge (rev 125624).
>
> Could this be committed please? I have tested with cygwin/AVR port and
> there were no regressions.
> I cannot test on other targets due to speed of Dejagnu under cygwin.
That doesn't look cheap. Also you don't explain how this happens in the
first place.
Richard.
> PS I have assignment paperwork on file with FSF.
>
>
> 2008-03-16 Andy Hutchinson <hutchinsonandy@aim.com>
>
> PR rtl-optimization/34916
> PR middle-end/35519
> * combine.c (create_log_links): Do not create duplicate LOG_LINKS
> between instruction pairs.
>
>
> Index: combine.c
> ===================================================================
> --- combine.c (revision 133282)
> +++ combine.c (working copy)
> @@ -976,8 +976,17 @@
> assignments later. */
> if (regno >= FIRST_PSEUDO_REGISTER
> || asm_noperands (PATTERN (use_insn)) < 0)
> - LOG_LINKS (use_insn) =
> - alloc_INSN_LIST (insn, LOG_LINKS (use_insn));
> + {
> + /* Don't add duplicates links between instructions. */
> + rtx links;
> + for (links = LOG_LINKS (use_insn); links; links = XEXP (links, 1))
> + if (insn == XEXP (links, 0))
> + break;
> +
> + if (!links)
> + LOG_LINKS (use_insn) =
> + alloc_INSN_LIST (insn, LOG_LINKS (use_insn));
> + }
> }
> next_use[regno] = NULL_RTX;
> }
>
>