[{"id":1775397,"web_url":"http://patchwork.ozlabs.org/comment/1775397/","msgid":"<ydd3779wu37.fsf@CeBiTec.Uni-Bielefeld.DE>","list_archive_url":null,"date":"2017-09-26T11:57:32","subject":"Re: [PATCH 2/5] pr60656.c: New target check: vect_mult_long","submitter":{"id":4362,"url":"http://patchwork.ozlabs.org/api/people/4362/","name":"Rainer Orth","email":"ro@CeBiTec.Uni-Bielefeld.DE"},"content":"Hi Andreas,\n\n> We don't have a 64 bit vector integer multiply on z.  Add a specific\n> check for that.\n>\n> 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>\n>\n> \t* gcc.dg/vect/pr60656.c: Check vect_mult_long.\n> \t* lib/target-supports.exp (check_effective_target_vect_mult_long):\n> \tNew proc.\n\nas usual, this and the other new effective-target keywords need\ndocumenting in sourcebuild.texi.\n\n\tRainer","headers":{"Return-Path":"<gcc-patches-return-462965-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-462965-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"wV8chyyE\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1fbQ5tRSz9t67\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 21:57:53 +1000 (AEST)","(qmail 96164 invoked by alias); 26 Sep 2017 11:57:45 -0000","(qmail 95784 invoked by uid 89); 26 Sep 2017 11:57:45 -0000","from smtp.CeBiTec.Uni-Bielefeld.DE (HELO\n\tsmtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tTue, 26 Sep 2017 11:57:44 +0000","from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1])\tby\n\tsmtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id\n\tE2D5E8DB; Tue, 26 Sep 2017 13:57:36 +0200 (CEST)","from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1])\tby localhost\n\t(malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new,\n\tport 10024)\twith LMTP id h-nsyTYIuLlZ;\n\tTue, 26 Sep 2017 13:57:35 +0200 (CEST)","from lokon.CeBiTec.Uni-Bielefeld.DE\n\t(lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.152])\t(using\n\tTLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\t(No\n\tclient certificate requested)\tby\n\tsmtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id\n\tA426C8DA; Tue, 26 Sep 2017 13:57:35 +0200 (CEST)","(from ro@localhost)\tby lokon.CeBiTec.Uni-Bielefeld.DE\n\t(8.15.2+Sun/8.15.2/Submit) id v8QBvWWk024718;\n\tTue, 26 Sep 2017 13:57:32 +0200 (MEST)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:from\n\t:to:cc:subject:references:date:in-reply-to:message-id\n\t:mime-version:content-type; q=dns; s=default; b=LlofLCMErC8KYkd2\n\tSykgw8TPNP5e6xty/mixuXAklRf4/yfPtq3b6h0bjC5Mf9pWk6jlpuXWH2Buxg6T\n\ty4khRn6hqdn9RCfwLYU/zo5tNvfcAecezXtYtS2AedBi9hhVYs/g/jHqjVD0TD6J\n\txdbxEcyY3QW9pLg0vIXbisn0gMQ=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:from\n\t:to:cc:subject:references:date:in-reply-to:message-id\n\t:mime-version:content-type; s=default; bh=+HhCK6cK+d1PUkZ9Bm14wV\n\tOUOD8=; b=wV8chyyEa9FQZmxoVrqBs0fcCx/C1udYLGy0YJaOslU/u0lqwSh8Fa\n\tIxscKqqdzA82liNXaU9IUIrYs0zni37pt4prbCSZBCKOtQYcHHNTzhsDgbcUJJo/\n\tN8vUbg/eyH43ipQrnBfY9j+cwqkiB/McA4AVto16J8zMvwd+NS+2Y=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-5.8 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_2, KAM_LAZY_DOMAIN_SECURITY,\n\tRP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=","X-HELO":"smtp.CeBiTec.Uni-Bielefeld.DE","From":"Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>","To":"Andreas Krebbel <krebbel@linux.vnet.ibm.com>","Cc":"gcc-patches@gcc.gnu.org","Subject":"Re: [PATCH 2/5] pr60656.c: New target check: vect_mult_long","References":"<20170926113950.5472-1-krebbel@linux.vnet.ibm.com>\t<20170926113950.5472-3-krebbel@linux.vnet.ibm.com>","Date":"Tue, 26 Sep 2017 13:57:32 +0200","In-Reply-To":"<20170926113950.5472-3-krebbel@linux.vnet.ibm.com>\n\t(Andreas\tKrebbel's message of \"Tue, 26 Sep 2017 13:39:47 +0200\")","Message-ID":"<ydd3779wu37.fsf@CeBiTec.Uni-Bielefeld.DE>","User-Agent":"Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v)","MIME-Version":"1.0","Content-Type":"text/plain","X-IsSubscribed":"yes"}},{"id":1775412,"web_url":"http://patchwork.ozlabs.org/comment/1775412/","msgid":"<c85b0bf4-c962-ba15-1a1f-daa930b82cb6@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-26T12:09:46","subject":"Re: [PATCH 2/5] pr60656.c: New target check: vect_mult_long","submitter":{"id":4421,"url":"http://patchwork.ozlabs.org/api/people/4421/","name":"Andreas Krebbel","email":"krebbel@linux.vnet.ibm.com"},"content":"On 09/26/2017 01:57 PM, Rainer Orth wrote:\n> Hi Andreas,\n> \n>> We don't have a 64 bit vector integer multiply on z.  Add a specific\n>> check for that.\n>>\n>> 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>\n>>\n>> \t* gcc.dg/vect/pr60656.c: Check vect_mult_long.\n>> \t* lib/target-supports.exp (check_effective_target_vect_mult_long):\n>> \tNew proc.\n> \n> as usual, this and the other new effective-target keywords need\n> documenting in sourcebuild.texi.\n> \n> \tRainer\n> \n\nOk.\n\n-Andreas-\n\npr60656.c: New target check: vect_mult_long\n\nWe don't have a 64 bit vector integer multiply on z.  Add a specific\ncheck for that.\n\ngcc/ChangeLog:\n\n2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>\n\n\t* doc/sourcebuild.texi: Document vect_mult_long.\n\ngcc/testsuite/ChangeLog:\n\n2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>\n\n\t* gcc.dg/vect/pr60656.c: Check vect_mult_long.\n\t* lib/target-supports.exp (check_effective_target_vect_mult_long):\n\tNew proc.\n\ndiff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi\nindex 9901c94..307c726 100644\n--- a/gcc/doc/sourcebuild.texi\n+++ b/gcc/doc/sourcebuild.texi\n@@ -1467,6 +1467,10 @@ into @code{int} results, or can promote (unpack) from @code{short} to\n Target supports a vector widening multiplication of @code{int} operands\n into @code{long} results.\n\n+@item vect_mult_long\n+Target supports a vector multiplication of @code{long} operands into\n+@code{long} results.\n+\n @item vect_sdot_qi\n Target supports a vector dot-product of @code{signed char}.\n\ndiff --git a/gcc/testsuite/gcc.dg/vect/pr60656.c b/gcc/testsuite/gcc.dg/vect/pr60656.c\nindex d9e30bb..f44269a 100644\n--- a/gcc/testsuite/gcc.dg/vect/pr60656.c\n+++ b/gcc/testsuite/gcc.dg/vect/pr60656.c\n@@ -43,4 +43,5 @@ int main()\n   return 0;\n }\n\n-/* { dg-final { scan-tree-dump-times \"vectorized 1 loops\" 1 \"vect\" { target\nvect_widen_mult_si_to_di_pattern } } } */\n+/* P * P * P requires a widening multiplication first as well as a longxlong->long after that.  */\n+/* { dg-final { scan-tree-dump-times \"vectorized 1 loops\" 1 \"vect\" { target {\nvect_widen_mult_si_to_di_pattern && vect_mult_long } } } } */\ndiff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp\nindex b45a19e..7fdfbbb 100644\n--- a/gcc/testsuite/lib/target-supports.exp\n+++ b/gcc/testsuite/lib/target-supports.exp\n@@ -5166,6 +5166,30 @@ proc check_effective_target_vect_long { } {\n     return $answer\n }\n\n+# Return 1 if the target supports hardware vector multiplication of\n+# long operands with a long result, 0 otherwise.\n+#\n+# This can change for different subtargets so do not cache the result.\n+\n+proc check_effective_target_vect_mult_long { } {\n+    if { [istarget i?86-*-*] || [istarget x86_64-*-*]\n+\t || (([istarget powerpc*-*-*]\n+              && ![istarget powerpc-*-linux*paired*])\n+              && [check_effective_target_ilp32])\n+\t || [is-effective-target arm_neon]\n+\t || ([istarget sparc*-*-*] && [check_effective_target_ilp32])\n+\t || [istarget aarch64*-*-*]\n+\t || ([istarget mips*-*-*]\n+\t      && [et-is-effective-target mips_msa]) } {\n+\tset answer 1\n+    } else {\n+\tset answer 0\n+    }\n+\n+    verbose \"check_effective_target_vect_mult_long: returning $answer\" 2\n+    return $answer\n+}\n+\n # Return 1 if the target supports hardware vectors of float, 0 otherwise.\n #\n # This won't change for different subtargets so cache the result.","headers":{"Return-Path":"<gcc-patches-return-462970-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-462970-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"wEWx9AsS\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1fv53bCzz9tX8\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 22:11:29 +1000 (AEST)","(qmail 75039 invoked by alias); 26 Sep 2017 12:11:22 -0000","(qmail 74143 invoked by uid 89); 26 Sep 2017 12:11:21 -0000","from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com)\n\t(148.163.158.5) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tTue, 26 Sep 2017 12:11:20 +0000","from pps.filterd (m0098417.ppops.net [127.0.0.1])\tby\n\tmx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8QCB3kU067039\tfor <gcc-patches@gcc.gnu.org>;\n\tTue, 26 Sep 2017 08:11:16 -0400","from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com\n\t[195.75.94.111])\tby mx0a-001b2d01.pphosted.com with ESMTP id\n\t2d7mfk9141-1\t(version=TLSv1.2 cipher=AES256-SHA bits=256\n\tverify=NOT)\tfor <gcc-patches@gcc.gnu.org>;\n\tTue, 26 Sep 2017 08:11:09 -0400","from localhost\tby e06smtp15.uk.ibm.com with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be\n\tprosecuted\tfor <gcc-patches@gcc.gnu.org> from\n\t<krebbel@linux.vnet.ibm.com>; Tue, 26 Sep 2017 13:09:48 +0100","from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196)\tby\n\te06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted;\n\tTue, 26 Sep 2017 13:09:47 +0100","from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com\n\t[9.149.105.59])\tby b06cxnps4074.portsmouth.uk.ibm.com\n\t(8.14.9/8.14.9/NCO v10.0) with ESMTP id v8QC9k8Y18153568;\n\tTue, 26 Sep 2017 12:09:46 GMT","from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1])\tby IMSVA\n\t(Postfix) with ESMTP id ECC22A4040;\n\tTue, 26 Sep 2017 13:05:39 +0100 (BST)","from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1])\tby IMSVA\n\t(Postfix) with ESMTP id BFD97A404D;\n\tTue, 26 Sep 2017 13:05:39 +0100 (BST)","from [9.152.212.134] (unknown [9.152.212.134])\tby\n\td06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP;\n\tTue, 26 Sep 2017 13:05:39 +0100 (BST)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:subject:to:cc:references:from:date:mime-version:in-reply-to\n\t:content-type:content-transfer-encoding:message-id; q=dns; s=\n\tdefault; b=ZxbTWbqf8ivCey5qNvDGFOOXntWcOsq+1ETmRHOi2wUSBwi8xLG13\n\t/0FvdHx1jQS8TIUx85bLLLpYhvZQyL3gkP01bbeDCO79TdVyMXAufL0VaFgkCKr9\n\t0FcFPmSwRSKYRfbf/7rd3jZzJiSJJl6rSSQ1YrWX3xF3SUQNniAJA4=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:subject:to:cc:references:from:date:mime-version:in-reply-to\n\t:content-type:content-transfer-encoding:message-id; s=default;\n\tbh=50BuIAstrLlEVAyPqOomKiYeSiw=; b=wEWx9AsSef+2xMNunDCrU05WGimO\n\tvwdHMV9qO4en60jpUQhisl6RrVuIEUTs1XA4OFQK8/9E5KknCriMCWz1t7tHNSMb\n\teRui2pkaKp4mUhBROV2ejps7kgDrdTs06/385KGoUi0bm5N8z3pb8rwTQ16bgFKB\n\tGgpfEf4un6BfCFA=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-24.7 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tKAM_LAZY_DOMAIN_SECURITY,\n\tRCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=","X-HELO":"mx0a-001b2d01.pphosted.com","Subject":"Re: [PATCH 2/5] pr60656.c: New target check: vect_mult_long","To":"Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>","Cc":"gcc-patches@gcc.gnu.org","References":"<20170926113950.5472-1-krebbel@linux.vnet.ibm.com>\n\t<20170926113950.5472-3-krebbel@linux.vnet.ibm.com>\n\t<ydd3779wu37.fsf@CeBiTec.Uni-Bielefeld.DE>","From":"Andreas Krebbel <krebbel@linux.vnet.ibm.com>","Date":"Tue, 26 Sep 2017 14:09:46 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64;\n\trv:52.0) Gecko/20100101 Thunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<ydd3779wu37.fsf@CeBiTec.Uni-Bielefeld.DE>","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"7bit","X-TM-AS-GCONF":"00","x-cbid":"17092612-0020-0000-0000-000003BB2F11","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17092612-0021-0000-0000-0000424D08AD","Message-Id":"<c85b0bf4-c962-ba15-1a1f-daa930b82cb6@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-26_04:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0 malwarescore=0 phishscore=0\n\tadultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx\n\tscancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1709260178","X-IsSubscribed":"yes"}}]