public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Cc: gcc-patches@gcc.gnu.org, Alexandre Oliva <aoliva@redhat.com>
Subject: Re: [Committed] S/390: Fix bootstrap comparison failure with 	--with-arch=z10
Date: Fri, 16 Oct 2009 10:44:00 -0000	[thread overview]
Message-ID: <20091016103754.GR14664@tyan-ft48-01.lab.bos.redhat.com> (raw)
In-Reply-To: <20091016100649.GA11719@bart>

On Fri, Oct 16, 2009 at 12:06:49PM +0200, Andreas Krebbel wrote:
> 2009-10-16  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
> 
> 	* config/s390/s390.c (s390_z10_optimize_cmp): Skip notes when
> 	investigating previous or next insns.
> 
> 
> Index: gcc/config/s390/s390.c
> ===================================================================
> *** gcc/config/s390/s390.c.orig	2009-10-16 10:17:13.000000000 +0200
> --- gcc/config/s390/s390.c	2009-10-16 10:24:40.000000000 +0200
> *************** s390_z10_optimize_cmp (rtx insn)
> *** 9866,9872 ****
>   
>     /* Swap the COMPARE arguments and its mask if there is a
>        conflicting access in the previous insn.  */
> !   prev_insn = PREV_INSN (insn);
>     if (prev_insn != NULL_RTX && INSN_P (prev_insn)
>         && reg_referenced_p (*op1, PATTERN (prev_insn)))
>       s390_swap_cmp (cond, op0, op1, insn);
> --- 9866,9872 ----
>   
>     /* Swap the COMPARE arguments and its mask if there is a
>        conflicting access in the previous insn.  */
> !   prev_insn = prev_nonnote_insn (insn);
>     if (prev_insn != NULL_RTX && INSN_P (prev_insn)
>         && reg_referenced_p (*op1, PATTERN (prev_insn)))
>       s390_swap_cmp (cond, op0, op1, insn);

Shouldn't you skip over DEBUG_INSNs as well?  prev_nonnote_insn
may give you a DEBUG_INSN, in which case it would be a -fcompare-debug
bug.  I don't see a helper function which would skip over both nonnotes
and DEBUG_INSNs though, except for prev_active_insn (but that one
skips over USE and CLOBBER INSN patterns as well, not sure if that is
desirable or not in this case).

> *************** s390_z10_optimize_cmp (rtx insn)
> *** 9877,9883 ****
>        the operands, or if swapping them would cause a conflict
>        with the previous insn, issue a NOP after the COMPARE in
>        order to separate the two instuctions.  */
> !   next_insn = NEXT_INSN (insn);
>     if (next_insn != NULL_RTX && INSN_P (next_insn)
>         && s390_non_addr_reg_read_p (*op1, next_insn))
>       {
> --- 9877,9883 ----
>        the operands, or if swapping them would cause a conflict
>        with the previous insn, issue a NOP after the COMPARE in
>        order to separate the two instuctions.  */
> !   next_insn = next_nonnote_insn (insn);
>     if (next_insn != NULL_RTX && INSN_P (next_insn)
>         && s390_non_addr_reg_read_p (*op1, next_insn))
>       {

	Jakub

  reply	other threads:[~2009-10-16 10:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-16 10:24 Andreas Krebbel
2009-10-16 10:44 ` Jakub Jelinek [this message]
2009-10-19  8:34   ` Andreas Krebbel

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=20091016103754.GR14664@tyan-ft48-01.lab.bos.redhat.com \
    --to=jakub@redhat.com \
    --cc=aoliva@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=krebbel@linux.vnet.ibm.com \
    /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).