public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] rs6000: Add testcase for PR88233
@ 2019-07-08 20:38 Segher Boessenkool
  0 siblings, 0 replies; only message in thread
From: Segher Boessenkool @ 2019-07-08 20:38 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool

This testcase tests that with -mcpu=power8 we do not generate any
mtvsr* instructions, and we do the copy with {l,st}xvd2x.

This currently fails with -m32.  That is an RA problem; I'll open a
new PR for that.

Committing.


2019-07-08  Segher Boessenkool  <segher@kernel.crashing.org>

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

---
 gcc/testsuite/gcc.target/powerpc/pr88233.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/powerpc/pr88233.c

diff --git a/gcc/testsuite/gcc.target/powerpc/pr88233.c b/gcc/testsuite/gcc.target/powerpc/pr88233.c
new file mode 100644
index 0000000..fa47b57
--- /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 } } */
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-08 20:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08 20:38 [PATCH] rs6000: Add testcase for PR88233 Segher Boessenkool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).