public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [PATCH, PR target/67761] Fix i686-*-* bootstrap comparison failure
@ 2015-09-30  7:48 Uros Bizjak
  2015-09-30 13:33 ` Ilya Enkovich
  0 siblings, 1 reply; 3+ messages in thread
From: Uros Bizjak @ 2015-09-30  7:48 UTC (permalink / raw)
  To: gcc-patches
  Cc: Илья
	Энкович

Hello!

> 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?

IMO, it would be also beneficial to bootstrap with slm default
architecture, so new code paths get some coverage via bootstrap.

> 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.

OK.

Thanks,
Uros.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH, PR target/67761] Fix i686-*-* bootstrap comparison failure
  2015-09-30  7:48 [PATCH, PR target/67761] Fix i686-*-* bootstrap comparison failure Uros Bizjak
@ 2015-09-30 13:33 ` Ilya Enkovich
  0 siblings, 0 replies; 3+ messages in thread
From: Ilya Enkovich @ 2015-09-30 13:33 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: gcc-patches

2015-09-30 9:06 GMT+03:00 Uros Bizjak <ubizjak@gmail.com>:
> Hello!
>
>> 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?
>
> IMO, it would be also beneficial to bootstrap with slm default
> architecture, so new code paths get some coverage via bootstrap.

I bootstrapped with --with-cpu=slm also.

>
>> 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.
>
> OK.

Thanks!

Ilya

>
> Thanks,
> Uros.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH, PR target/67761] Fix i686-*-* bootstrap comparison failure
@ 2015-09-29 16:30 Ilya Enkovich
  0 siblings, 0 replies; 3+ messages in thread
From: Ilya Enkovich @ 2015-09-29 16:30 UTC (permalink / raw)
  To: gcc-patches

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;
+}

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-30 13:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-30  7:48 [PATCH, PR target/67761] Fix i686-*-* bootstrap comparison failure Uros Bizjak
2015-09-30 13:33 ` Ilya Enkovich
  -- strict thread matches above, loose matches on Subject: below --
2015-09-29 16:30 Ilya Enkovich

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).