public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jingyu at google dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/42691] problematic REG_EQUAL note added to SUBREG
Date: Tue, 12 Jan 2010 22:22:00 -0000	[thread overview]
Message-ID: <20100112222153.3789.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42691-17567@http.gcc.gnu.org/bugzilla/>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1873 bytes --]



------- Comment #5 from jingyu at google dot com  2010-01-12 22:21 -------
Subject: Re:  problematic REG_EQUAL note added to 
        SUBREG

On Tue, Jan 12, 2010 at 12:57 AM, ebotcazou at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
>
>
> ------- Comment #4 from ebotcazou at gcc dot gnu dot org  2010-01-12 08:57 -------
>> Then gcc comes to line3657. Since changed_i3_dest is 0, gcc does not
>> call adjust_for_new_dest at all.
>>
>> line3657:
>> if (changed_i3_dest)
>>     {
>>       PATTERN (i3) = newpat;
>>       adjust_for_new_dest (i3);
>>     }
>
> We should try and set changed_i3_dest to 1 in this particular case as well.
>
> Where does the dest get changed exactly?
>

In our example, GCC first sets the new pattern to "newpat". "newpat"
actually points to the pattern of i2.
At line3750, gcc records i3's note into "i3notes" and propagates the
note if shared.
Then at line3775, gcc assigns newpat to i3.
At line3775 (combine.c):
    INSN_CODE (i3) = insn_code_number;
    PATTERN (i3) = newpat;
At line3837,  REG_NOTES (i3) = 0;
At line3879, "i3notes" is distributed back to i3.


>> I did not read the entire combine pass. So I am not sure whether it is
>> fine to just add something like this after line3062 where
>> recog_for_combine is called.
>>
>>           if (insn_code_number >= 0)
>>             changed_i3_dest = 1;
>
> Too big a hammer, the dest of I3 is generally not changed.


>
>> Another option to fix this problem is not to attach REG_EQUAL note to
>> "set subreg reg" at all during forward propagation.
>
> Too big a hammer as well, the note is correct at this point.
>
>
> --
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42691
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42691


  parent reply	other threads:[~2010-01-12 22:22 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 19:45 [Bug middle-end/42691] New: Wrong REG_EQUAL note is added to SUBREG node jingyu at google dot com
2010-01-11 19:59 ` [Bug middle-end/42691] " jingyu at google dot com
2010-01-11 22:00 ` [Bug rtl-optimization/42691] problematic REG_EQUAL note added to SUBREG ebotcazou at gcc dot gnu dot org
2010-01-12  2:45 ` jingyu at google dot com
2010-01-12  8:57 ` ebotcazou at gcc dot gnu dot org
2010-01-12  9:33 ` ramana at gcc dot gnu dot org
2010-01-12 22:22 ` jingyu at google dot com [this message]
2010-01-13  1:18 ` jingyu at google dot com
2010-01-13 10:03 ` ebotcazou at gcc dot gnu dot org
2010-01-13 20:04 ` jingyu at google dot com
2010-01-13 22:57 ` jingyu at google dot com
2010-01-13 23:27 ` ebotcazou at gcc dot gnu dot org
2010-01-14  0:13 ` jingyu at google dot com
2010-01-14  9:32 ` [Bug rtl-optimization/42691] [4.4/4.5 regression] " rguenth at gcc dot gnu dot org
2010-01-15 18:48 ` jingyu at gcc dot gnu dot org
2010-01-15 19:09 ` jingyu at gcc dot gnu dot org
2010-01-15 20:59 ` sezeroz at gmail dot com
2010-01-15 21:11 ` mikpe at it dot uu dot se
2010-01-15 21:14 ` jingyu at google dot com
2010-01-15 21:42 ` mikpe at it dot uu dot se
2010-01-15 21:46 ` jingyu at google dot com
2010-01-15 21:50 ` ebotcazou at gcc dot gnu dot org
2010-01-15 21:54 ` jingyu at gcc dot gnu dot org
2010-01-15 21:59 ` jakub at gcc dot gnu dot org
2010-01-15 22:12 ` jingyu at gcc dot gnu dot org
2010-01-15 22:25 ` jingyu at google dot com
2010-01-16 16:05 ` jakub at gcc dot gnu dot org
2010-01-20 23:30 ` rguenth at gcc dot gnu dot org
2010-01-20 23:48 ` jingyu at google dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100112222153.3789.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).