Patchwork Testcase for PR45678

login
register
mail settings
Submitter Richard Guenther
Date Sept. 17, 2010, 1:56 p.m.
Message ID <alpine.LNX.2.00.1009171556060.28912@zhemvz.fhfr.qr>
Download mbox | patch
Permalink /patch/65080/
State New
Headers show

Comments

Richard Guenther - Sept. 17, 2010, 1:56 p.m.
Committed.

Richard.

2010-09-17  Richard Guenther  <rguenther@suse.de>

	PR middle-end/45678
	* gcc.dg/torture/pr45678-1.c: New testcase.
Jakub Jelinek - Sept. 17, 2010, 2:01 p.m.
On Fri, Sep 17, 2010 at 03:56:29PM +0200, Richard Guenther wrote:
> 2010-09-17  Richard Guenther  <rguenther@suse.de>
> 
> 	PR middle-end/45678
> 	* gcc.dg/torture/pr45678-1.c: New testcase.

That just means the problem will be only rarely tested, because it only
exhibited itself on i?86 and there you need -msse2 for it.

> --- testsuite/gcc.dg/torture/pr45678-1.c	(revision 0)
> +++ testsuite/gcc.dg/torture/pr45678-1.c	(revision 0)
> @@ -0,0 +1,16 @@
> +/* { dg-do run } */
> +
> +typedef float V __attribute__ ((vector_size (16)));
> +V g;
> +float d[4] = { 4, 3, 2, 1 };
> +
> +int
> +main ()
> +{
> +  V e;
> +  __builtin_memcpy (&e, &d, sizeof (d));
> +  V f = { 5, 15, 25, 35 };
> +  e = e * f;
> +  g = e;
> +  return 0;
> +}

	Jakub
Richard Guenther - Sept. 17, 2010, 2:06 p.m.
On Fri, 17 Sep 2010, Jakub Jelinek wrote:

> On Fri, Sep 17, 2010 at 03:56:29PM +0200, Richard Guenther wrote:
> > 2010-09-17  Richard Guenther  <rguenther@suse.de>
> > 
> > 	PR middle-end/45678
> > 	* gcc.dg/torture/pr45678-1.c: New testcase.
> 
> That just means the problem will be only rarely tested, because it only
> exhibited itself on i?86 and there you need -msse2 for it.

It'll be tested on x86_64 with -m32 (which I always test).  And it
will be tested on i?86-darwin where -msse2 is the default.

Richard.
H.J. Lu - Sept. 17, 2010, 2:24 p.m.
On Fri, Sep 17, 2010 at 6:56 AM, Richard Guenther <rguenther@suse.de> wrote:
>
> Committed.

Thanks.

>
> Richard.
>
> 2010-09-17  Richard Guenther  <rguenther@suse.de>
>
>        PR middle-end/45678
>        * gcc.dg/torture/pr45678-1.c: New testcase.
>

Do we still see DECL_ALIGN issue with `d' on stack?
Richard Guenther - Sept. 17, 2010, 2:31 p.m.
On Fri, 17 Sep 2010, H.J. Lu wrote:

> On Fri, Sep 17, 2010 at 6:56 AM, Richard Guenther <rguenther@suse.de> wrote:
> >
> > Committed.
> 
> Thanks.
> 
> >
> > Richard.
> >
> > 2010-09-17  Richard Guenther  <rguenther@suse.de>
> >
> >        PR middle-end/45678
> >        * gcc.dg/torture/pr45678-1.c: New testcase.
> >
> 
> Do we still see DECL_ALIGN issue with `d' on stack?

Yes.

Richard.

Patch

Index: testsuite/gcc.dg/torture/pr45678-1.c
===================================================================
--- testsuite/gcc.dg/torture/pr45678-1.c	(revision 0)
+++ testsuite/gcc.dg/torture/pr45678-1.c	(revision 0)
@@ -0,0 +1,16 @@ 
+/* { dg-do run } */
+
+typedef float V __attribute__ ((vector_size (16)));
+V g;
+float d[4] = { 4, 3, 2, 1 };
+
+int
+main ()
+{
+  V e;
+  __builtin_memcpy (&e, &d, sizeof (d));
+  V f = { 5, 15, 25, 35 };
+  e = e * f;
+  g = e;
+  return 0;
+}