diff mbox

[i386] : Testcases for PR 58679 (Was: reverting a LRA change)

Message ID CAFULd4Y2aj1XfpmPFTCtiBN7GBrhwbZ_UjUdoRgbJfOw1Ch18A@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Oct. 27, 2013, 8:40 p.m. UTC
On Sun, Oct 27, 2013 at 9:39 PM, Uros Bizjak <ubizjak@gmail.com> wrote:

> I have committed a couple of testcases from the PR, the first was
> actually fixed by [1], the second is a short testcase that failed
> without the revert.
>
> 2013-10-27  Uros Bizjak  <ubizjak@gmail.com>
>
>     PR target/58679
>     * gcc.target/i386/pr58679-1.c: New test.
>     * gcc.target/i386/pr58679-2.c: Ditto.

Now with the patch attached.

Uros.
diff mbox

Patch

Index: testsuite/gcc.target/i386/pr58679-1.c
===================================================================
--- testsuite/gcc.target/i386/pr58679-1.c	(revision 0)
+++ testsuite/gcc.target/i386/pr58679-1.c	(working copy)
@@ -0,0 +1,13 @@ 
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx" } */
+
+typedef struct { char a; long long b; } S;
+
+S foo (S x, S y)
+{
+  S z;
+
+  z.a = 0;
+  z.b = x.b / y.b;
+  return z;
+}
Index: testsuite/gcc.target/i386/pr58679-2.c
===================================================================
--- testsuite/gcc.target/i386/pr58679-2.c	(revision 0)
+++ testsuite/gcc.target/i386/pr58679-2.c	(working copy)
@@ -0,0 +1,7 @@ 
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx" } */
+
+int f (long long a, long long b)
+{
+  return (a * b) >> 16;
+}