public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ilya Enkovich <enkovich.gnu@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH, PR target/67761] Fix i686-*-* bootstrap comparison failure
Date: Tue, 29 Sep 2015 16:30:00 -0000	[thread overview]
Message-ID: <20150929161936.GC26618@msticlxl57.ims.intel.com> (raw)

Hi,

My recenttly introduced STV pass doesn't skip debug instructions and it causes transformation (mistly cost computation) depending on debug info.  It causes bootstrap comparison failure.  This patch fixes.  Bootstrapped for i686-linux.  Testing for x86_64-unknown-linux-gnu{,m32} is in progress.  OK for trunk if pass?

Thanks,
Ilya
--
gcc/

2015-09-29  Ilya Enkovich  <enkovich.gnu@gmail.com>

	* config/i386/i386.c (scalar_chain::analyze_register_chain): Ignore
	debug insns.
	(scalar_chain::convert_reg): Likewise.

gcc/testsuite/

2015-09-29  Ilya Enkovich  <enkovich.gnu@gmail.com>

	* gcc.target/i386/pr67761.c: New test.


diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 6f2380f..7b3ffb0 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2919,6 +2919,10 @@ scalar_chain::analyze_register_chain (bitmap candidates, df_ref ref)
   for (chain = DF_REF_CHAIN (ref); chain; chain = chain->next)
     {
       unsigned uid = DF_REF_INSN_UID (chain->ref);
+
+      if (!NONDEBUG_INSN_P (DF_REF_INSN (chain->ref)))
+	continue;
+
       if (!DF_REF_REG_MEM_P (chain->ref))
 	{
 	  if (bitmap_bit_p (insns, uid))
@@ -3279,7 +3283,7 @@ scalar_chain::convert_reg (unsigned regno)
 	    bitmap_clear_bit (conv, DF_REF_INSN_UID (ref));
 	  }
       }
-    else
+    else if (NONDEBUG_INSN_P (DF_REF_INSN (ref)))
       {
 	replace_rtx (DF_REF_INSN (ref), reg, scopy);
 	df_insn_rescan (DF_REF_INSN (ref));
diff --git a/gcc/testsuite/gcc.target/i386/pr67761.c b/gcc/testsuite/gcc.target/i386/pr67761.c
new file mode 100644
index 0000000..9b13d58
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr67761.c
@@ -0,0 +1,13 @@
+/* PR target/pr67761 */
+/* { dg-do run { target { ia32 } } } */
+/* { dg-options "-O2 -march=slm -g" } */
+/* { dg-final { scan-assembler "paddq" } } */
+
+void
+test (long long *values, long long val, long long delta)
+{
+  unsigned i;
+
+  for (i = 0; i < 128; i++, val += delta)
+    values[i] = val;
+}

             reply	other threads:[~2015-09-29 16:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 16:30 Ilya Enkovich [this message]
2015-09-30  7:48 Uros Bizjak
2015-09-30 13:33 ` Ilya Enkovich

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=20150929161936.GC26618@msticlxl57.ims.intel.com \
    --to=enkovich.gnu@gmail.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).