From patchwork Thu Aug 17 14:18:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: will schmidt X-Patchwork-Id: 802697 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-460515-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="oY/gF+QT"; 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 3xY7d963Mqz9t42 for ; Fri, 18 Aug 2017 00:19:25 +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:reply-to:to:cc:content-type:date:mime-version :content-transfer-encoding:message-id; q=dns; s=default; b=JLd/M Y/tufol+henMvIJ5oP9qCVFcwjo1iMsDQ9jD+rhxGOx8HQO7U1cVYTMF042VoKzs neabQk7Pr2g9+t71E0fcxit2s2n9WvOJAfNFBx/HDJX7kNSd74Dv3BVvWx4Sw8Ha DG+hSGHT1SGh/GGb7akzjPLqJqz/MDIQz2NzvM= 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:content-type:date:mime-version :content-transfer-encoding:message-id; s=default; bh=sLiuLLqHzD+ bkulnKQYoaQM3C3I=; b=oY/gF+QT8Rk0m4ZghX09AZeUMAiX5RyqS+10XkDxMEX ENnrSPU/TadGXzEPe7Q4qzzLDNxIPLaDdhX6lPF10LUWdVLT9HkjZ0e9mnSIXkXa 3q6PErRO0YEHkQQ9f8dkz4lmFHr5hhhmryeXXgWf5B+A0hXaW2/GTKLk8MZYtIFo = Received: (qmail 112872 invoked by alias); 17 Aug 2017 14:19:17 -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 111983 invoked by uid 89); 17 Aug 2017 14:19:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 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=H*Ad:D*us.ibm.com, vsi2 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, 17 Aug 2017 14:19:14 +0000 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v7HEJCGr147263 for ; Thu, 17 Aug 2017 10:19:13 -0400 Received: from e15.ny.us.ibm.com (e15.ny.us.ibm.com [129.33.205.205]) by mx0b-001b2d01.pphosted.com with ESMTP id 2cdac6a9ag-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 17 Aug 2017 10:19:12 -0400 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Aug 2017 10:18:57 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e15.ny.us.ibm.com (146.89.104.202) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 17 Aug 2017 10:18:55 -0400 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v7HEIt4k24510564; Thu, 17 Aug 2017 14:18:55 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EACB112403D; Thu, 17 Aug 2017 10:16:16 -0400 (EDT) Received: from [9.10.86.107] (unknown [9.10.86.107]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP id A1A5412404E; Thu, 17 Aug 2017 10:16:16 -0400 (EDT) Subject: [PATCH, rs6000] Add testcase coverage for vec_sums built-in From: Will Schmidt Reply-To: will_schmidt@vnet.ibm.com To: GCC Patches Cc: Segher Boessenkool , "Carl E. Love" , Bill Schmidt , David Edelsohn Date: Thu, 17 Aug 2017 09:18:54 -0500 Mime-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 17081714-0036-0000-0000-0000025A54CA X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007561; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000222; SDB=6.00903649; UDB=6.00452702; IPR=6.00683862; BA=6.00005538; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016739; XFM=3.00000015; UTC=2017-08-17 14:18:56 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17081714-0037-0000-0000-000041786662 Message-Id: <1502979534.14827.8.camel@brimstone.rchland.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-08-17_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1708170238 X-IsSubscribed: yes Hi, [Patch, rs6000] Add testcase coverage for vec_sums built-in Add some testcase coverage for the vec_sums() built-in. Tested across power platforms (p6 and newer). OK for trunk? Thanks, -Will [gcc/testsuite] 2017-08-17 Will Schmidt * gcc.target/powerpc/fold-vec-sums-int.c: New. diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-sums-int.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-sums-int.c new file mode 100644 index 0000000..6ef5f3b --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-sums-int.c @@ -0,0 +1,16 @@ +/* Verify that overloaded built-ins for vec_sums with int + inputs produce the right results. */ + +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_altivec_ok } */ +/* { dg-options "-maltivec -O2" } */ + +#include + +vector signed int +test_vec_sums (vector signed int vsi2, vector signed int vsi3) +{ + return vec_sums (vsi2, vsi3); +} + +/* { dg-final { scan-assembler-times "vsumsws" 1 } } */