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



------- Comment #10 from ebotcazou at gcc dot gnu dot org  2010-01-13 23:27 -------
> Otherwise, I would simply remove this comment.

Fine with me, it's indeed a little confusing.

> I does hunk #3, because I am not sure if all combination results from
> case2 would pass "recog_for_combine". If any case fail, gcc may try
> other combination patterns, where I am afraid changed_i3_dest=1 may
> cause problem. I haven't read the code after validate_replacement
> label thoroughly. To be conservative, I use hunk#3 to guarantee that
> if the combination result from case2 is not recognized, nothing has
> been changed. gcc is free to go ahead and try other combination
> patterns. This is conservative. If anyone confirms that the cases that
> I concern of will never happen, I am happy to remove hunk#3. Can you
> confirm?

Yes, jumping to validate_replacement means that the other combinations are not
tried.  If the new pattern is not valid, the code will try to massage it and
not try other combinations.  And I think that, in practice, it won't actually
do anything since the various subsequent tricks are incompatible with case2.

> Index: combine.c
> ===================================================================
> --- combine.c   (revision 155801)
> +++ combine.c   (working copy)
> @@ -2663,10 +2663,17 @@ try_combine (rtx i3, rtx i2, rtx i1, int
>           i2dest = SET_DEST (temp);
>           i2dest_killed = dead_or_set_p (i2, i2dest);
> 
> +         /* Replace the source in I2 with our dest and make the resulting
> +            insn the new pattern for I3.  Then skip to where we
> +            validate the pattern.  Everything was set up above.  */

"Replace the source in I2 with the new constant and..."

>           SUBST (SET_SRC (temp),
>                  immed_double_const (olo, ohi, GET_MODE (SET_DEST (temp))));
>
>           newpat = PATTERN (i2);
> +
> +          /* If the result of combination is recognized, the note of I3 needs
> +           * to be removed. */
> +          changed_i3_dest = 1;

No need to invoke the consequences, just state the cause: "The dest of I3 has
been replaced with the dest of I2."


-- 


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


  parent reply	other threads:[~2010-01-13 23:27 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
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 [this message]
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=20100113232737.16061.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).