From patchwork Tue Feb 19 21:07:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pat Haugen X-Patchwork-Id: 1044896 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-496663-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="E/KFuwgf"; 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 443tbY2BFpz9s1l for ; Wed, 20 Feb 2019 08:07:21 +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:from :subject:to:cc:date:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=nsPWs u3IvfJKmDeFf7s2tvJr4FMUTlFNC/tEXGS4M+qmTryGu28LXQVeyfxhKneE/rzst wj0rMt3WuzDHS6vZBqeIG5g0pZlwDSppDaUoZgMLOvVMjalhuECtkPUqD/dVs831 wJQO+6td2eS2kmyE84zuMZ3PBStB60ITZW2qhw= 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:from :subject:to:cc:date:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=vw0fl+eu9lh z3gL23lXw/zNkmEo=; b=E/KFuwgfMaFB62aEwGYCcuEGs1kkTo8D4wChZthQCAQ RUNL1COTo/hU/4SJ1CXZA4BSgR61cuTVvTDFqjnhe+ZIJmD+x5Gwe2JLpAUxEnJ3 9bHZuzPuQNjxmYU+PHp3FJNCqEGpe6HNWgd754fVI7z4nd8vDba+QD6Qhjzl9l4c = Received: (qmail 16864 invoked by alias); 19 Feb 2019 21:07:13 -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 16688 invoked by uid 89); 19 Feb 2019 21:07:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=sad, SAD, x86_64**, 86-*-* X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Feb 2019 21:07:11 +0000 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1JL4JYW113179 for ; Tue, 19 Feb 2019 16:07:10 -0500 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qrrtesjym-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 19 Feb 2019 16:07:09 -0500 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Feb 2019 21:07:09 -0000 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 19 Feb 2019 21:07:05 -0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1JL74R625886922 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Feb 2019 21:07:04 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5FCB67805C; Tue, 19 Feb 2019 21:07:04 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0CBC178066; Tue, 19 Feb 2019 21:07:03 +0000 (GMT) Received: from pmac.rchland.ibm.com (unknown [9.10.86.155]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTPS; Tue, 19 Feb 2019 21:07:03 +0000 (GMT) From: Pat Haugen Subject: [PATCH, testsuite] Enable vect_usad_char effective target for PowerPC and fix up SAD_EXPR testcases To: GCC Patches Cc: Richard Biener , Segher Boessenkool , Bill Schmidt Date: Tue, 19 Feb 2019 15:07:03 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 x-cbid: 19021921-0012-0000-0000-0000170D53C0 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010627; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000281; SDB=6.01163464; UDB=6.00607492; IPR=6.00944046; MB=3.00025660; MTD=3.00000008; XFM=3.00000015; UTC=2019-02-19 21:07:07 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19021921-0013-0000-0000-000056430D88 Message-Id: <78fa9345-97af-d0e0-954f-6ed9925884cf@linux.ibm.com> X-IsSubscribed: yes Power9 added support for V16QImode SAD operations. While making the check_effective_target change I noticed that the tests will also pass on Power7/Power8 even though they don't have the optab support. The reason is the tests are only checking that the source pattern is recognized, not that a SAD_EXPR was actually generated. So I've updated the tests also. Ok for trunk? -Pat testsuite/ChangeLog: 2019-02-19 Pat Haugen * lib/target-supports.exp (check_effective_target_vect_usad_char): Add PowerPC support. * gcc.dg/vect/slp-reduc-sad.c: Update scan string. * gcc.dg/vect/vect-reduc-sad.c: Likewise. Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp (revision 268784) +++ gcc/testsuite/lib/target-supports.exp (working copy) @@ -5982,7 +5982,9 @@ proc check_effective_target_vect_usad_ch expr { [istarget i?86-*-*] || [istarget x86_64-*-*] || ([istarget aarch64*-*-*] - && ![check_effective_target_aarch64_sve])}}] + && ![check_effective_target_aarch64_sve]) + || ([istarget powerpc*-*-*] + && [check_p9vector_hw_available])}}] } # Return 1 if the target plus current options supports both signed Index: gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c (revision 268784) +++ gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c (working copy) @@ -58,6 +58,6 @@ main () return 0; } -/* { dg-final { scan-tree-dump "vect_recog_sad_pattern: detected" "vect" } } */ +/* { dg-final { scan-tree-dump "sad pattern recognized" "vect" } } */ /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c (revision 268784) +++ gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c (working copy) @@ -49,6 +49,6 @@ main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vect_recog_sad_pattern: detected" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "sad pattern recognized" 1 "vect" } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */