This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: rtl-optimization/34408
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Jan Hubicka" <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 17 Feb 2008 20:39:50 +0100
- Subject: Re: rtl-optimization/34408
- References: <20080217193022.GH28452@kam.mff.cuni.cz>
On Feb 17, 2008 8:30 PM, Jan Hubicka <jh@suse.cz> wrote:
> Hi,
> This patch fixes invalid sharing reported in the PR. I've
> bootstrapped/regtested it on i686-linux but it is not that good test
> given that the pass is not enabled ;)
Given that SEE is broken anyway this is ok.
Richard.
> Honza
>
> int isLegalIdChar (char);
> char get();
>
> char z;
>
> void FillBuffer ( void )
> {
> char c;
> while(1)
> {
> c = get();
> if (!isLegalIdChar(c))
> break;
> z = c;
> }
> }
> PR rtl-optimization/34408
> see.c (see_def_extension_not_merged): Copy subreg so we don't have invalid sharing.
> Index: see.c
> ===================================================================
> *** see.c (revision 132380)
> --- see.c (working copy)
> *************** see_def_extension_not_merged (struct see
> *** 2508,2514 ****
> d.to = new_pseudo_reg;
> note_uses (&PATTERN (ref_copy), see_replace_src, &d);
> /* Step b: Replace every instance of dest_reg with the subreg. */
> ! ref_copy = replace_rtx (ref_copy, dest_reg, subreg);
>
> /* Step c: Replace every use of the new pseudo register back to
> dest_real_reg. */
> --- 2508,2514 ----
> d.to = new_pseudo_reg;
> note_uses (&PATTERN (ref_copy), see_replace_src, &d);
> /* Step b: Replace every instance of dest_reg with the subreg. */
> ! ref_copy = replace_rtx (ref_copy, dest_reg, copy_rtx (subreg));
>
> /* Step c: Replace every use of the new pseudo register back to
> dest_real_reg. */
>