public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix PR34916, 35519 Combine (Dataflow merge regression.)
@ 2008-03-18 21:41 Andy H
  2008-03-18 21:48 ` Richard Guenther
  2008-03-19 10:43 ` Jakub Jelinek
  0 siblings, 2 replies; 20+ messages in thread
From: Andy H @ 2008-03-18 21:41 UTC (permalink / raw)
  To: gcc-patches, steven

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

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.

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.


[-- Attachment #2: combine.diff --]
[-- Type: text/plain, Size: 1078 bytes --]

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;
             }

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2008-04-06 18:18 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-18 21:41 Fix PR34916, 35519 Combine (Dataflow merge regression.) Andy H
2008-03-18 21:48 ` Richard Guenther
2008-03-18 22:42   ` Andy H
2008-03-18 22:47     ` Richard Guenther
2008-03-19  1:32       ` Andy H
2008-03-19  7:47         ` Paolo Bonzini
2008-03-19  7:52           ` Paolo Bonzini
2008-03-19  9:58           ` Richard Guenther
2008-03-19 10:09             ` Paolo Bonzini
2008-03-19 10:12               ` Paolo Bonzini
2008-03-19 10:43 ` Jakub Jelinek
2008-03-19 14:59   ` hutchinsonandy
2008-03-25 11:41     ` hutchinsonandy
2008-03-25 12:16       ` Eric Botcazou
2008-03-25 13:18         ` hutchinsonandy
2008-03-25 13:39           ` Jakub Jelinek
2008-03-25 14:03             ` hutchinsonandy
2008-04-03  1:21               ` [PING] " Andy H
2008-04-03  9:17                 ` Richard Guenther
2008-04-06 18:45                   ` Gerald Pfeifer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).