re PR target/60077 (gcc.target/i386/pr35767-5.c FAILs)
authorJakub Jelinek <jakub@redhat.com>
Fri, 7 Feb 2014 23:55:24 +0000 (00:55 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 7 Feb 2014 23:55:24 +0000 (00:55 +0100)
PR target/60077
* gcc.target/i386/pr60077-1.c: New test.
* gcc.target/i386/pr60077-2.c: New test.

From-SVN: r207622

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr60077-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr60077-2.c [new file with mode: 0644]

index a50fa4b..feca2e2 100644 (file)
@@ -1,3 +1,9 @@
+2014-02-08  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/60077
+       * gcc.target/i386/pr60077-1.c: New test.
+       * gcc.target/i386/pr60077-2.c: New test.
+
 2014-02-07  Jakub Jelinek  <jakub@redhat.com>
 
        PR preprocessor/56824
diff --git a/gcc/testsuite/gcc.target/i386/pr60077-1.c b/gcc/testsuite/gcc.target/i386/pr60077-1.c
new file mode 100644 (file)
index 0000000..f20ca0a
--- /dev/null
@@ -0,0 +1,18 @@
+/* Test that we generate aligned load when memory is aligned.  */
+/* { dg-do compile } */
+/* { dg-options "-O -mavx -mtune=generic" } */
+/* { dg-final { scan-assembler-not "movups" } } */
+/* { dg-final { scan-assembler "movaps" } } */
+
+typedef float v8sf __attribute__ ((__vector_size__ (32)));
+
+extern void foo (v8sf, v8sf, v8sf, v8sf, v8sf, v8sf, v8sf, v8sf, v8sf);
+
+int
+test (void)
+{
+  v8sf x = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 };
+
+  foo (x, x, x, x, x, x, x, x, x);
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr60077-2.c b/gcc/testsuite/gcc.target/i386/pr60077-2.c
new file mode 100644 (file)
index 0000000..bbf846f
--- /dev/null
@@ -0,0 +1,18 @@
+/* Test that we generate aligned load when memory is aligned.  */
+/* { dg-do compile } */
+/* { dg-options "-O -mavx -mtune=generic" } */
+/* { dg-final { scan-assembler-not "movups" } } */
+/* { dg-final { scan-assembler "movaps" } } */
+
+typedef float v8sf __attribute__ ((__vector_size__ (32)));
+
+extern void foo (int, int, int, int, int, int, int, v8sf, v8sf, v8sf, v8sf, v8sf, v8sf, v8sf, v8sf, v8sf);
+
+int
+test (void)
+{
+  v8sf x = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 };
+
+  foo (1, 2, 3, 4, 5, 6, 7, x, x, x, x, x, x, x, x, x);
+  return 0;
+}