public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Add test for PR85770.
@ 2018-12-06  0:41 Jeff Law
  2018-12-06 23:40 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Law @ 2018-12-06  0:41 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 210 bytes --]


PR85770 is fixed by Segher's combiner patch to avoid combining hard
regs.  Presumably it helps because it gives the allocators more freedom.

I'm adding the testcase from the PR to the regression suite.

Jeff

[-- Attachment #2: P --]
[-- Type: text/plain, Size: 1435 bytes --]

commit 40fc691eac0ea9414f7908826c91afc70ff78617
Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Dec 6 00:40:08 2018 +0000

            PR rtl-optimization/85770
            * gcc.target/i386/pr85770.c: New test.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266839 138bc75d-0d04-0410-961f-82ee72b054a4

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8bed4b455e0..cc5d556eeca 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2018-12-05  Jeff Law  <law@redhat.com>
+
+	PR rtl-optimization/85770
+	* gcc.target/i386/pr85770.c: New test.
+
 2018-12-05  Martin Sebor  <msebor@redhat.com>
 
 	PR c/87028
diff --git a/gcc/testsuite/gcc.target/i386/pr85770.c b/gcc/testsuite/gcc.target/i386/pr85770.c
new file mode 100644
index 00000000000..dbb685fd83f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr85770.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=nano-1000 -fnon-call-exceptions -fno-tree-coalesce-vars" } */
+
+unsigned a, b, c, d, e, f, g, h, i;
+unsigned __int128 j;
+
+__int128 foo(char k, unsigned short l, unsigned m, unsigned n, __int128 o,
+             unsigned char p) {
+  long q;
+  p |= -k;
+  __builtin_add_overflow(p, m, &q);
+  m *= ~__builtin_clrsbll(0);
+  j = j >> (o & 127) | j << (o & 7);
+  return k + l + m + n + o + a + b + c + d + j + l + e + f + q + 4294967295 +
+         p + g + h + i;
+}
+

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

* Re: [committed] Add test for PR85770.
  2018-12-06  0:41 [committed] Add test for PR85770 Jeff Law
@ 2018-12-06 23:40 ` Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2018-12-06 23:40 UTC (permalink / raw)
  To: Jeff Law; +Cc: gcc-patches

On Wed, Dec 05, 2018 at 05:41:49PM -0700, Jeff Law wrote:
> 
> PR85770 is fixed by Segher's combiner patch to avoid combining hard
> regs.  Presumably it helps because it gives the allocators more freedom.
> 
> I'm adding the testcase from the PR to the regression suite.
> 
> Jeff

> commit 40fc691eac0ea9414f7908826c91afc70ff78617
> Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
> Date:   Thu Dec 6 00:40:08 2018 +0000
> 
>             PR rtl-optimization/85770
>             * gcc.target/i386/pr85770.c: New test.

The test FAILs on i686-linux, because __int128 is not supported on 32-bit
targets.

Fixed thusly, tested on x86_64-linux and i686-linux, committed as obvious to
trunk.

2018-12-07  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/85770
	* gcc.target/i386/pr85770.c: Require int128 effective target.

--- gcc/testsuite/gcc.target/i386/pr85770.c	(revision 266876)
+++ gcc/testsuite/gcc.target/i386/pr85770.c	(working copy)
@@ -1,4 +1,5 @@
-/* { dg-do compile } */
+/* PR rtl-optimization/85770 */
+/* { dg-do compile { target int128 } } */
 /* { dg-options "-O2 -march=nano-1000 -fnon-call-exceptions -fno-tree-coalesce-vars" } */
 
 unsigned a, b, c, d, e, f, g, h, i;
@@ -14,4 +15,3 @@ __int128 foo(char k, unsigned short l, u
   return k + l + m + n + o + a + b + c + d + j + l + e + f + q + 4294967295 +
          p + g + h + i;
 }
-


	Jakub

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

end of thread, other threads:[~2018-12-06 23:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-06  0:41 [committed] Add test for PR85770 Jeff Law
2018-12-06 23:40 ` Jakub Jelinek

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