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: Yet another sharing fix


On 6/28/07, Jan Hubicka <jh@suse.cz> wrote:
Hi,
this patch fixes sharing failure seen on x86-64 compiling
gcc.c-torture/compile/950612-1.c at -Os.

Basically validate_replace_rtx group uses with unshareable RTL all leads
to invalid sharing when the expression is substituted multiple times.
The following patch simply makes it unshared all the time, this makes no
difference for combine.c nor gerald's testcase.  If we get serious about
it, we might perhaps count number of times we substituted TO and copy
only when doing it more than once.

In the case of testcase an SUBREG expression is substituted.

Bootstrapped/regtested i686-linux, OK?

Ok.


Thanks,
Richard.

Honza

Index: recog.c
===================================================================
--- recog.c     (revision 126078)
+++ recog.c     (working copy)
@@ -538,7 +538,7 @@ validate_replace_rtx_1 (rtx *loc, rtx fr
       || (GET_CODE (x) == GET_CODE (from) && GET_MODE (x) == GET_MODE (from)
          && rtx_equal_p (x, from)))
     {
-      validate_change (object, loc, to, 1);
+      validate_unshare_change (object, loc, to, 1);
       return;
     }




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