From patchwork Tue Feb 27 15:23:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: will schmidt X-Patchwork-Id: 878631 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-473938-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vnet.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="U6Vv7Tl/"; 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 3zrMsc0MChz9s1n for ; Wed, 28 Feb 2018 02:23:31 +1100 (AEDT) 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:reply-to:to:cc:in-reply-to:references:content-type :date:mime-version:content-transfer-encoding:message-id; q=dns; s=default; b=ntgOGJzsLj+2nPgT71YevAIIJeWc0UaZoIDVsP92hRIFlkF9Gf EdN98XsaOKnFa4R4oI1unhpLZv6xPi5fS1cBsCqsRPW67NRTDtlF9FUX4OAVHkpL hMf3bozptsUX7r/g57cjRt70pheqw7UGrBeCyx6tosRWQOGH5hw9L9VQ4= 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:reply-to:to:cc:in-reply-to:references:content-type :date:mime-version:content-transfer-encoding:message-id; s= default; bh=CnVwo2nsrgpS7tX/YzZ5tGO+05w=; b=U6Vv7Tl/9/+Iw0MzhEJG b1LAvgsylFhaaBX+sklGXBzQuml0z/TsLiXZoEXWYcyRb6mOTRw632Bbg5RyBy3N DozK7VPDb8UJAys2my9f83mS0H3udKcaDXS+ScyMcBnpzCraG4MB0DDSR3LbEs6r eHZ+RsO8ChXwmMKMQ0aCrMg= Received: (qmail 116784 invoked by alias); 27 Feb 2018 15:23:23 -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 116274 invoked by uid 89); 27 Feb 2018 15:23:22 -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= 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; Tue, 27 Feb 2018 15:23:21 +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 w1RFNDa7188500 for ; Tue, 27 Feb 2018 10:23:19 -0500 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gd7fg7sb2-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 27 Feb 2018 10:23:17 -0500 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Feb 2018 10:23:16 -0500 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 27 Feb 2018 10:23:14 -0500 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1RFNEwT53870688; Tue, 27 Feb 2018 15:23:14 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AC8A0AE04E; Tue, 27 Feb 2018 10:24:37 -0500 (EST) Received: from [9.10.86.107] (unknown [9.10.86.107]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP id 6D100AE03C; Tue, 27 Feb 2018 10:24:37 -0500 (EST) Subject: [PATCH, rs6000] (v2) Update altivec-7 testcase(s). From: Will Schmidt Reply-To: will_schmidt@vnet.ibm.com To: Segher Boessenkool Cc: gcc-patches@gcc.gnu.org, David Edelsohn , Bill Schmidt In-Reply-To: <20180226173447.GT21977@gate.crashing.org> References: <1519234394.11602.370.camel@brimstone.rchland.ibm.com> <20180222180616.GG21977@gate.crashing.org> <1519403743.31591.3.camel@brimstone.rchland.ibm.com> <20180226173447.GT21977@gate.crashing.org> Date: Tue, 27 Feb 2018 09:23:12 -0600 Mime-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18022715-0024-0000-0000-0000032D4D0F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008601; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.00995880; UDB=6.00506241; IPR=6.00775204; MB=3.00019762; MTD=3.00000008; XFM=3.00000015; UTC=2018-02-27 15:23:16 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18022715-0025-0000-0000-0000472A34F6 Message-Id: <1519744992.31591.56.camel@brimstone.rchland.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-02-27_05:, , 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-1802270193 X-IsSubscribed: yes Hi, V2 update to incorporate suggested changes. Move the vsx related content from the altivec-7-be test into a new vsx-7-be test. Split out the VSX specific bits into a vsx-7.h header file, and include that when appropriate. (v2 updates). Adjust target stanza to allow 32bit targets to run test. Updated scan-assembler stanzas to accommodate codegen variations involving lxvd2x in BE versus LE versus P9. Sniff tested across p6-p9 systems with -m32,-m64. Test currently runs clean. This fixes up results as seen on some power systems. [testsuite] 2018-02-27 Will Schmidt * gcc.target/powerpc/altivec-7-be.c: Remove VSX content, allow -32 bit target. * gcc.target/powerpc/altivec-7.h: Remove VSX content. * gcc.target/powerpc/vsx-7-be.c: New test (VSX content). * gcc.target/powerpc/vsx-7.h: New include (VSX content). * gcc.target/powerpc/altivec-7-le.c: Add vsx-7.h include. diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-7-be.c b/gcc/testsuite/gcc.target/powerpc/altivec-7-be.c index cbc31e6..1e690be 100644 --- a/gcc/testsuite/gcc.target/powerpc/altivec-7-be.c +++ b/gcc/testsuite/gcc.target/powerpc/altivec-7-be.c @@ -1,12 +1,12 @@ -/* { dg-do compile { target powerpc64-*-* } } */ +/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-require-effective-target powerpc_altivec_ok } */ /* { dg-options "-maltivec" } */ /* Expected results for Big Endian: vec_packpx vpkpx - vec_ld lxv2x + vec_ld lxvd2x vec_lde lvewx vec_ldl lxvl vec_lvewx lvewx vec_unpackh vupklsh vec_unpackl vupkhsh @@ -19,17 +19,12 @@ */ /* { dg-final { scan-assembler-times "vpkpx" 2 } } */ /* { dg-final { scan-assembler-times "vmulesb" 1 } } */ /* { dg-final { scan-assembler-times "vmulosb" 1 } } */ -/* { dg-final { scan-assembler-times "lxvd2x" 6 } } */ /* { dg-final { scan-assembler-times "lvewx" 2 } } */ /* { dg-final { scan-assembler-times "lvxl" 1 } } */ /* { dg-final { scan-assembler-times "vupklsh" 1 } } */ /* { dg-final { scan-assembler-times "vupkhsh" 1 } } */ -/* { dg-final { scan-assembler-times "xxlnor" 4 } } */ -/* { dg-final { scan-assembler-times "xxland" 4 } } */ -/* { dg-final { scan-assembler-times "xxlxor" 5 } } */ -/* { dg-final { scan-assembler-times "vupkhpx" 1 } } */ /* Source code for the test in altivec-7.h */ #include "altivec-7.h" diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-7-le.c b/gcc/testsuite/gcc.target/powerpc/altivec-7-le.c index 6f895336..38ce153 100644 --- a/gcc/testsuite/gcc.target/powerpc/altivec-7-le.c +++ b/gcc/testsuite/gcc.target/powerpc/altivec-7-le.c @@ -30,7 +30,8 @@ /* { dg-final { scan-assembler-times "xxlnor" 4 } } */ /* { dg-final { scan-assembler-times "xxland" 4 } } */ /* { dg-final { scan-assembler-times "xxlxor" 5 } } */ /* { dg-final { scan-assembler-times "vupkhpx" 1 } } */ -/* Source code for the test in altivec-7.h */ +/* Source code for the test in altivec-7.h and vsx-7.h. */ #include "altivec-7.h" +#include "vsx-7.h" diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-7.h b/gcc/testsuite/gcc.target/powerpc/altivec-7.h index ff87deb..4dedcd8 100644 --- a/gcc/testsuite/gcc.target/powerpc/altivec-7.h +++ b/gcc/testsuite/gcc.target/powerpc/altivec-7.h @@ -15,11 +15,10 @@ vector signed int *vecint; vector signed short *vecshort; vector unsigned char *vecuchar; vector unsigned int *vecuint; vector unsigned short *vecushort; vector float *vecfloat; -vector double *vecdouble; int main () { *vecfloat++ = vec_andc((vector bool int)vecint[0], vecfloat[1]); *vecfloat++ = vec_andc(vecfloat[0], (vector bool int)vecint[1]); @@ -41,10 +40,8 @@ int main () *vecushort++ = vec_vxor(vecushort[0], (vector bool short)vecshort[1]); *vecuint++ = vec_ld(var_int[0], uintp[1]); *vecuint++ = vec_lvx(var_int[0], uintp[1]); *vecuint++ = vec_vmsumubm(vecuchar[0], vecuchar[1], vecuint[2]); *vecuchar++ = vec_xor(vecuchar[0], (vector unsigned char)vecchar[1]); - *vecdouble++ = vec_unpackl(vecfloat[0]); - *vecdouble++ = vec_unpackh(vecfloat[0]); return 0; } diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-7-be.c b/gcc/testsuite/gcc.target/powerpc/vsx-7-be.c new file mode 100644 index 0000000..52bcc43 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-7-be.c @@ -0,0 +1,46 @@ +/* { dg-do compile { target powerpc*-*-* } } */ +/* { dg-require-effective-target powerpc_vsx_ok } */ +/* { dg-options "-mvsx" } */ + +/* This is an extension of altivec-7-be.c, with vsx target features included. */ + +/* Expected results for Big Endian: +(from altivec-7.h) + vec_packpx vpkpx + vec_ld lxvd2x + vec_lde lvewx + vec_ldl lxvl + vec_lvewx lvewx + vec_andc xxnor + xxland + vec_vxor xxlxor + vec_vmsumubm vmsumubm + vec_vmulesb vmulesb + vec_vmulosb vmulosb +(from vsx-7.h) + vec_unpackl vupkhsh + vec_unpackh vupklsh +*/ + +/* { dg-final { scan-assembler-times "vpkpx" 2 } } */ +/* { dg-final { scan-assembler-times "vmulesb" 1 } } */ +/* { dg-final { scan-assembler-times "vmulosb" 1 } } */ + +/* { dg-final { scan-assembler-times {\mlxvd2x\M} 0 { target { p9vector_hw } } } } */ +/* { dg-final { scan-assembler-times {\mlxvd2x\M} 36 { target { { ! powerpc_p9vector_ok } && powerpc*le-*-* } } } } */ +/* { dg-final { scan-assembler-times {\mlxvd2x\M} 6 { target { ! powerpc*le-*-* } } } } */ + +/* { dg-final { scan-assembler-times "lvewx" 2 } } */ +/* { dg-final { scan-assembler-times "lvxl" 1 } } */ +/* { dg-final { scan-assembler-times "vupklsh" 1 } } */ +/* { dg-final { scan-assembler-times "vupkhsh" 1 } } */ +/* { dg-final { scan-assembler-times "xxlnor" 4 } } */ +/* { dg-final { scan-assembler-times "xxland" 4 } } */ +/* { dg-final { scan-assembler-times "xxlxor" 5 } } */ +/* { dg-final { scan-assembler-times "vupkhpx" 1 } } */ + +/* Source code for the 'altivec' test in altivec-7.h */ +/* Source code for the 'vsx' required tests in vsx-7.h */ + +#include "altivec-7.h" +#include "vsx-7.h" diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-7.h b/gcc/testsuite/gcc.target/powerpc/vsx-7.h new file mode 100644 index 0000000..fe55472 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-7.h @@ -0,0 +1,18 @@ + +/* This test code is included into vsx-7-be.c. + * this is meant to supplement code in altivec-7.h. */ + +#include + + +vector float *vecfloat; +vector double *vecdouble; + +int main2 () +{ + + *vecdouble++ = vec_unpackl(vecfloat[0]); + *vecdouble++ = vec_unpackh(vecfloat[0]); + + return 0; +}