fmls.c: New test.
authorSteve Ellcey <sellcey@cavium.com>
Fri, 17 Nov 2017 22:56:52 +0000 (22:56 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Fri, 17 Nov 2017 22:56:52 +0000 (22:56 +0000)
2017-11-17  Steve Ellcey  <sellcey@cavium.com>

* gcc.target/aarch64/fmls.c: New test.

From-SVN: r254906

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/fmls.c [new file with mode: 0644]

index 0dbe4731cc15bddde5069dcd224050226363ecec..52ae4a1025fb47afe264ccceb536e41621ddb0fe 100644 (file)
@@ -1,3 +1,7 @@
+2017-11-17  Steve Ellcey  <sellcey@cavium.com>
+
+       * gcc.target/aarch64/fmls.c: New test.
+
 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
 
        * gcc.target/aarch64/pr81356.c: New test.
diff --git a/gcc/testsuite/gcc.target/aarch64/fmls.c b/gcc/testsuite/gcc.target/aarch64/fmls.c
new file mode 100644 (file)
index 0000000..1ea0e6a
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+#define vector __attribute__((vector_size(16)))
+vector double a = {1.0,1.0};
+vector double b = {2.0,2.0};
+double x = 3.0;
+
+
+void __attribute__ ((noinline))
+vf (double x, vector double *v1, vector double *v2, vector double *result)
+{
+  vector double s = v1[0];
+  vector double t = -v2[0];
+  vector double m = {x,x};
+  vector double r = t * m + s;
+  result[0] = r;
+}
+/* { dg-final { scan-assembler-not "dup" } } */