From 9d9171550a399cac1d1717cf1bd31ec3750b0dfd Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Mon, 8 Jul 2019 22:38:46 +0200 Subject: [PATCH] rs6000: Add testcase for PR88233 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 | 5 +++++ gcc/testsuite/gcc.target/powerpc/pr88233.c | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 gcc/testsuite/gcc.target/powerpc/pr88233.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 31c3314b49b..a78c745150b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-07-08 Segher Boessenkool + + PR rtl-optimization/88233 + * gcc.target/powerpc/pr88233.c: New testcase. + 2019-07-08 Wilco Dijkstra 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 index 00000000000..fa47b57441d --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr88233.c @@ -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 } } */ -- 2.30.2