rs6000: Add testcase for PR88233
authorSegher Boessenkool <segher@kernel.crashing.org>
Mon, 8 Jul 2019 20:38:46 +0000 (22:38 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Mon, 8 Jul 2019 20:38:46 +0000 (22:38 +0200)
This testcase tests that with -mcpu=power8 we do not generate any
mtvsr* instructions, and we do the copy with {l,st}xvd2x.

gcc/testsuite/
PR rtl-optimization/88233
* gcc.target/powerpc/pr88233.c: New testcase.

From-SVN: r273245

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/pr88233.c [new file with mode: 0644]

index 31c3314..a78c745 100644 (file)
@@ -1,3 +1,8 @@
+2019-07-08  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       PR rtl-optimization/88233
+       * gcc.target/powerpc/pr88233.c: New testcase.
+
 2019-07-08  Wilco Dijkstra  <wdijkstr@arm.com>
 
        PR testsuite/91059
diff --git a/gcc/testsuite/gcc.target/powerpc/pr88233.c b/gcc/testsuite/gcc.target/powerpc/pr88233.c
new file mode 100644 (file)
index 0000000..fa47b57
--- /dev/null
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mcpu=power8" } */
+
+typedef struct { double a[2]; } A;
+A
+foo (const A *a)
+{
+  return *a;
+}
+
+/* { dg-final { scan-assembler-not {\mmtvsr} } } */
+/* { dg-final { scan-assembler-times {\mlxvd2x\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mstxvd2x\M} 1 } } */