public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Andreas Krebbel" <krebbel@linux.vnet.ibm.com>
To: gcc-patches@gcc.gnu.org
Subject: [Committed] S/390: Fix bootstrap comparison failure with 	--with-arch=z10
Date: Fri, 16 Oct 2009 10:24:00 -0000	[thread overview]
Message-ID: <20091016100649.GA11719@bart> (raw)

Hi,

in the machine dependent reorg pass we walk through the insn stream in
order to do some modifications avoiding problematic situations for the
z10 CPU.  While looking at previous and next insns we do not skip over
insn notes. This unfortunately makes the code generation dependent on
the presence of NOTEs.

So bootstrapping with --with-arch=z10 currently fails with a
comparison failure since the additional notes added for variable
locations when debug info is enabled actually lead to different code
to be generated.

Fixed with the attached patch.

z10 default bootstrap is fixed with that change.

Committed to mainline

Bye,

-Andreas-


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);
*************** 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))
      {

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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-16 10:24 Andreas Krebbel [this message]
2009-10-16 10:44 ` Jakub Jelinek
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=20091016100649.GA11719@bart \
    --to=krebbel@linux.vnet.ibm.com \
    --cc=gcc-patches@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).