From: Segher Boessenkool Date: Mon, 8 Jul 2019 20:38:46 +0000 (+0200) Subject: rs6000: Add testcase for PR88233 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9d9171550a399cac1d1717cf1bd31ec3750b0dfd;p=gcc.git 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 --- 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 } } */