From patchwork Thu May 10 17:57:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Carl Love X-Patchwork-Id: 911486 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-477521-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=us.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="AEC7S6ZE"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40hgt7092mz9s15 for ; Fri, 11 May 2018 03:57:34 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:date:mime-version:message-id:content-type :content-transfer-encoding; q=dns; s=default; b=E9JryCepM74by14k umL+7/4jCv6Q6POXpn9D6ysvZRefHN2GnIKXCh6tTHQhEiizxtSCPm7ifF+1roQk GQi/u/n9GW5HupXUB/eeNgvig1qaIdPlmM5dfGRWAPwLTBxFjY7VhP61Frmn6G8O MuZnJZ6ixHiRaIe6ukGHO6rl2iY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:date:mime-version:message-id:content-type :content-transfer-encoding; s=default; bh=W8+aq3OIpyLJSCZSQky+yo 2aGU0=; b=AEC7S6ZEhbbHPcn1fTpPWBjVybWqNZhm86mLzYU0DeiFYqOanvRH4G MS3IkJq3da+JOU1gEEy9JTiVUjTSNp7YbsPN9UwcVtaQDejWRniFxbU4InuiX1eJ F8Gyw+zdpac3LaA576ckHkcbqvkcrsGy4u/oPmXMaKi+lnsNPUnas= Received: (qmail 70217 invoked by alias); 10 May 2018 17:57:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 67245 invoked by uid 89); 10 May 2018 17:57:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=lp64 X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 10 May 2018 17:57:23 +0000 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4AHsXwN087867 for ; Thu, 10 May 2018 13:57:21 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0b-001b2d01.pphosted.com with ESMTP id 2hvqy49628-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 10 May 2018 13:57:21 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 10 May 2018 11:57:20 -0600 Received: from b03cxnp08028.gho.boulder.ibm.com (9.17.130.20) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 10 May 2018 11:57:18 -0600 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4AHvHWp11469130; Thu, 10 May 2018 10:57:17 -0700 Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C338D136044; Thu, 10 May 2018 11:57:17 -0600 (MDT) Received: from oc3304648336.ibm.com (unknown [9.70.82.186]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP id 70FDC136043; Thu, 10 May 2018 11:57:17 -0600 (MDT) Subject: [PATCH, rs6000] Fix expected BE counts for vsx-vector-6.h From: Carl Love To: Segher Boessenkool , gcc-patches@gcc.gnu.org, David Edelsohn Cc: Bill Schmidt , cel@us.ibm.com Date: Thu, 10 May 2018 10:57:16 -0700 Mime-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18051017-0012-0000-0000-0000163373CD X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009001; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000259; SDB=6.01030352; UDB=6.00526572; IPR=6.00809482; MB=3.00021034; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-10 17:57:19 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051017-0013-0000-0000-000052AFED43 Message-Id: <1525975036.8281.5.camel@us.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-10_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805100168 X-IsSubscribed: yes GCC Maintainers: The following patch fixes issues found with the instruction counts for the vsx-vector-6.h test. It was found that on a BE system where GCC is configured with --with-cpu=power6 the expected counts in vsx-vector-6- be.c do not match. This patch fixes the expected counts when configuring and building GCC using --with-cpu=power6, --with-cpu=power7 and --with-cpu=power8 on a BE system. The patch was tested on     powerpc64le-unknown-linux-gnu (Power 8 LE)     powerpc64-unknown-linux-gnu (Power 8 BE) configured for power6   powerpc64-unknown-linux-gnu (Power 8 BE) configured for power7  powerpc64-unknown-linux-gnu (Power 8 BE) configured for power8 Please let me know if the patch looks OK for GCC mainline.                          Carl Love --------------------------------------------------------- gcc/testsuite/ChangeLog: 2018-05-10 Carl Love * gcc.target/powerpc/vsx-vector-6-be.c (dg-options): Update to run on Power 6 only. (dg-final): Update xvcmpgtdp, xvcmpgedp counts for Power 6. * gcc.target/powerpc/vsx-vector-6-be.p7.c (dg-final): New test file for Power 7. * gcc.target/powerpc/vsx-vector-6-be.p8.c (dg-final): New test file for Power 8. --- gcc/testsuite/gcc.target/powerpc/vsx-vector-6-be.c | 7 +++-- .../gcc.target/powerpc/vsx-vector-6-be.p7.c | 34 ++++++++++++++++++++++ .../gcc.target/powerpc/vsx-vector-6-be.p8.c | 34 ++++++++++++++++++++++ 3 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-vector-6-be.p7.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-vector-6-be.p8.c diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-be.c b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-be.c index 3305781..aa2093c 100644 --- a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-be.c +++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-be.c @@ -1,15 +1,16 @@ /* { dg-do compile { target { powerpc64-*-* && lp64 } } } */ /* { dg-skip-if "" { powerpc*-*-darwin* } } */ /* { dg-require-effective-target powerpc_vsx_ok } */ -/* { dg-options "-mvsx -O2" } */ +/* { dg-options "-mvsx -O2 -mcpu=power6" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */ /* Expected instruction counts for Big Endian */ /* { dg-final { scan-assembler-times "xvabsdp" 1 } } */ /* { dg-final { scan-assembler-times "xvadddp" 1 } } */ /* { dg-final { scan-assembler-times "xxlnor" 7 } } */ -/* { dg-final { scan-assembler-times "xvcmpeqdp" 6 } } */ -/* { dg-final { scan-assembler-times "xvcmpgtdp" 8 } } */ +/* { dg-final { scan-assembler-times "xvcmpeqdp" 9 } } */ +/* { dg-final { scan-assembler-times "xvcmpgtdp" 10 } } */ /* { dg-final { scan-assembler-times "xvcmpgedp" 7 } } */ /* { dg-final { scan-assembler-times "xvrdpim" 1 } } */ /* { dg-final { scan-assembler-times "xvmaddadp" 1 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-be.p7.c b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-be.p7.c new file mode 100644 index 0000000..01c3c2b --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-be.p7.c @@ -0,0 +1,34 @@ +/* { dg-do compile { target { powerpc64-*-* && lp64 } } } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } } */ +/* { dg-require-effective-target powerpc_vsx_ok } */ +/* { dg-options "-mvsx -O2 -mcpu=power7" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ + + +/* Expected instruction counts for Big Endian */ + +/* { dg-final { scan-assembler-times "xvabsdp" 1 } } */ +/* { dg-final { scan-assembler-times "xvadddp" 1 } } */ +/* { dg-final { scan-assembler-times "xxlnor" 7 } } */ +/* { dg-final { scan-assembler-times "xvcmpeqdp" 6 } } */ +/* { dg-final { scan-assembler-times "xvcmpgtdp" 8 } } */ +/* { dg-final { scan-assembler-times "xvcmpgedp" 7 } } */ +/* { dg-final { scan-assembler-times "xvrdpim" 1 } } */ +/* { dg-final { scan-assembler-times "xvmaddadp" 1 } } */ +/* { dg-final { scan-assembler-times "xvmsubadp" 1 } } */ +/* { dg-final { scan-assembler-times "xvsubdp" 1 } } */ +/* { dg-final { scan-assembler-times "xvmaxdp" 1 } } */ +/* { dg-final { scan-assembler-times "xvmindp" 1 } } */ +/* { dg-final { scan-assembler-times "xvmuldp" 1 } } */ +/* { dg-final { scan-assembler-times "vperm" 1 } } */ +/* { dg-final { scan-assembler-times "xvrdpic" 1 } } */ +/* { dg-final { scan-assembler-times "xvsqrtdp" 1 } } */ +/* { dg-final { scan-assembler-times "xvrdpiz" 1 } } */ +/* { dg-final { scan-assembler-times "xvmsubasp" 1 } } */ +/* { dg-final { scan-assembler-times "xvnmaddasp" 1 } } */ +/* { dg-final { scan-assembler-times "vmsumshs" 1 } } */ +/* { dg-final { scan-assembler-times "xxland" 13 } } */ +/* { dg-final { scan-assembler-times "xxsel" 2 } } */ + +/* Source code for the test in vsx-vector-6.h */ +#include "vsx-vector-6.h" diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-be.p8.c b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-be.p8.c new file mode 100644 index 0000000..2f72378 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-be.p8.c @@ -0,0 +1,34 @@ +/* { dg-do compile { target { powerpc64-*-* && lp64 } } } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } } */ +/* { dg-require-effective-target powerpc_vsx_ok } */ +/* { dg-options "-mvsx -O2 -mcpu=power8" } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */ + + +/* Expected instruction counts for Big Endian */ + +/* { dg-final { scan-assembler-times "xvabsdp" 1 } } */ +/* { dg-final { scan-assembler-times "xvadddp" 1 } } */ +/* { dg-final { scan-assembler-times "xxlnor" 7 } } */ +/* { dg-final { scan-assembler-times "xvcmpeqdp" 6 } } */ +/* { dg-final { scan-assembler-times "xvcmpgtdp" 8 } } */ +/* { dg-final { scan-assembler-times "xvcmpgedp" 7 } } */ +/* { dg-final { scan-assembler-times "xvrdpim" 1 } } */ +/* { dg-final { scan-assembler-times "xvmaddadp" 1 } } */ +/* { dg-final { scan-assembler-times "xvmsubadp" 1 } } */ +/* { dg-final { scan-assembler-times "xvsubdp" 1 } } */ +/* { dg-final { scan-assembler-times "xvmaxdp" 1 } } */ +/* { dg-final { scan-assembler-times "xvmindp" 1 } } */ +/* { dg-final { scan-assembler-times "xvmuldp" 1 } } */ +/* { dg-final { scan-assembler-times "vperm" 1 } } */ +/* { dg-final { scan-assembler-times "xvrdpic" 1 } } */ +/* { dg-final { scan-assembler-times "xvsqrtdp" 1 } } */ +/* { dg-final { scan-assembler-times "xvrdpiz" 1 } } */ +/* { dg-final { scan-assembler-times "xvmsubasp" 1 } } */ +/* { dg-final { scan-assembler-times "xvnmaddasp" 1 } } */ +/* { dg-final { scan-assembler-times "vmsumshs" 1 } } */ +/* { dg-final { scan-assembler-times "xxland" 13 } } */ +/* { dg-final { scan-assembler-times "xxsel" 2 } } */ + +/* Source code for the test in vsx-vector-6.h */ +#include "vsx-vector-6.h"