From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118106 invoked by alias); 8 Jul 2019 20:36:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 118092 invoked by uid 89); 8 Jul 2019 20:36:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1131 X-HELO: gcc1-power7.osuosl.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 08 Jul 2019 20:36:31 +0000 Received: by gcc1-power7.osuosl.org (Postfix, from userid 10019) id 001FD12406D5; Mon, 8 Jul 2019 20:36:29 +0000 (UTC) From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: Segher Boessenkool Subject: [PATCH] rs6000: Add testcase for PR88233 Date: Mon, 08 Jul 2019 20:38:00 -0000 Message-Id: <6b6c7f08ea1b0bb3660329e56b604ba102eb64c7.1562617684.git.segher@kernel.crashing.org> X-IsSubscribed: yes X-SW-Source: 2019-07/txt/msg00615.txt.bz2 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 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