{"id":819548,"url":"http://patchwork.ozlabs.org/api/patches/819548/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/20170928115044.21422-5-krebbel@linux.vnet.ibm.com/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170928115044.21422-5-krebbel@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-28T11:50:03","name":"[4/5] New target check for double<->int conversions","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"376886c1e84b4a7af001353d5bae81f15f64db48","submitter":{"id":4421,"url":"http://patchwork.ozlabs.org/api/people/4421/?format=json","name":"Andreas Krebbel","email":"krebbel@linux.vnet.ibm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/20170928115044.21422-5-krebbel@linux.vnet.ibm.com/mbox/","series":[{"id":5545,"url":"http://patchwork.ozlabs.org/api/series/5545/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=5545","date":"2017-09-28T11:49:59","name":"vect testsuite adjustments for S/390 - v2","version":1,"mbox":"http://patchwork.ozlabs.org/series/5545/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/819548/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/819548/checks/","tags":{},"related":[],"headers":{"Return-Path":"<gcc-patches-return-463104-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-463104-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=\"GQAnfpN0\"; 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 3y2tPg6cNJz9t3v\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 28 Sep 2017 21:53:43 +1000 (AEST)","(qmail 114640 invoked by alias); 28 Sep 2017 11:53:36 -0000","(qmail 114629 invoked by uid 89); 28 Sep 2017 11:53:36 -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\tThu, 28 Sep 2017 11:53:34 +0000","from pps.filterd (m0098416.ppops.net [127.0.0.1])\tby\n\tmx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8SBndce050161\tfor <gcc-patches@gcc.gnu.org>;\n\tThu, 28 Sep 2017 07:53:33 -0400","from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com\n\t[195.75.94.110])\tby mx0b-001b2d01.pphosted.com with ESMTP id\n\t2d8yxrt5v6-1\t(version=TLSv1.2 cipher=AES256-SHA bits=256\n\tverify=NOT)\tfor <gcc-patches@gcc.gnu.org>;\n\tThu, 28 Sep 2017 07:53:32 -0400","from localhost\tby e06smtp14.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>; Thu, 28 Sep 2017 12:53:31 +0100","from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194)\tby\n\te06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted;\n\tThu, 28 Sep 2017 12:53:30 +0100","from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com\n\t[9.149.105.61])\tby b06cxnps3074.portsmouth.uk.ibm.com\n\t(8.14.9/8.14.9/NCO v10.0) with ESMTP id v8SBrTxe25231594\tfor\n\t<gcc-patches@gcc.gnu.org>; Thu, 28 Sep 2017 11:53:29 GMT","from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1])\tby IMSVA\n\t(Postfix) with ESMTP id D5E9A11C050\tfor <gcc-patches@gcc.gnu.org>;\n\tThu, 28 Sep 2017 12:49:20 +0100 (BST)","from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1])\tby IMSVA\n\t(Postfix) with ESMTP id BBD1311C04A\tfor <gcc-patches@gcc.gnu.org>;\n\tThu, 28 Sep 2017 12:49:20 +0100 (BST)","from maggie.boeblingen.de.ibm.com (unknown [9.152.212.134])\tby\n\td06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS\tfor\n\t<gcc-patches@gcc.gnu.org>; Thu, 28 Sep 2017 12:49:20 +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:from\n\t:to:subject:date:in-reply-to:references:message-id; q=dns; s=\n\tdefault; b=dJrv2NGPK2f7JnJwWCPTKmibzaNX/FeW7iUl/lZ1PxrgLxTZvu1QW\n\tPtzSfSoisOFT8ioZH4Ft3O0w1RDFpqqfIOVXlrMWo7BuaJ9ig3VqEYc8GqN7AEfV\n\tS0j3o0zt8Q99GVI/Nbxtu1P0iUHxcrSUseyxCxGUWCpwqgUhMo32FA=","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:subject:date:in-reply-to:references:message-id; s=default;\n\tbh=rJm/mIMFF+cZHzCCsnzFypY632g=; b=GQAnfpN0v9A5zfz5T+xiT15yxN/C\n\tsmSMjlLbHU0W+Su8gu+N98KN9T9hmrh2B32YQgUMLVtk8cnOWckb7wvEnSB33XDm\n\tlnlq5tXP5Kg3EK3TAiqWIznJMLq766hqBDBB9UxDmIV/tgtEU/AfDGR/fTb6/ItD\n\tijHZ3Gzs8gOWdss=","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","From":"Andreas Krebbel <krebbel@linux.vnet.ibm.com>","To":"gcc-patches@gcc.gnu.org","Subject":"[PATCH 4/5] New target check for double<->int conversions","Date":"Thu, 28 Sep 2017 13:50:03 +0200","In-Reply-To":"<20170928115044.21422-1-krebbel@linux.vnet.ibm.com>","References":"<20170928115044.21422-1-krebbel@linux.vnet.ibm.com>","X-TM-AS-GCONF":"00","x-cbid":"17092811-0016-0000-0000-000004F0ED20","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17092811-0017-0000-0000-0000282B412B","Message-Id":"<20170928115044.21422-5-krebbel@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-28_04:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=1 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-1709280177","X-IsSubscribed":"yes"},"content":"gcc/ChangeLog:\n\n2017-09-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>\n\n\t* doc/sourcebuild.texi: Document vect_intdouble_cvt and\n\tvect_doubleint_cvt.\n\ngcc/testsuite/ChangeLog:\n\n2017-09-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>\n\n\t* gcc.dg/vect/pr66251.c: Replace vect_floatint_cvt with\n\tvect_doubleint_cvt and vect_intfloat_cvt with vect_intdouble_cvt.\n\t* gcc.dg/vect/vect-floatint-conversion-2.c: Replace\n\tvect_floatint_cvt with vect_doubleint_cvt.\n\t* gcc.dg/vect/vect-intfloat-conversion-3.c: Replace\n\tvect_intfloat_cvt with vect_intdouble_cvt.\n\t* gfortran.dg/vect/pr60510.f: Require vect_intdouble_cvt.\n\t* gfortran.dg/vect/vect-8.f90: Make number of vectorized loops\n\tdepend on vect_intdouble_cvt.\n\t* lib/target-supports.exp\n\t(check_effective_target_vect_doubleint_cvt)\n\t(check_effective_target_vect_intdouble_cvt): New procs.\n---\n gcc/doc/sourcebuild.texi                           |  6 +++\n gcc/testsuite/gcc.dg/vect/pr66251.c                |  4 +-\n .../gcc.dg/vect/vect-floatint-conversion-2.c       |  2 +-\n .../gcc.dg/vect/vect-intfloat-conversion-3.c       |  2 +-\n gcc/testsuite/gfortran.dg/vect/pr60510.f           |  1 +\n gcc/testsuite/gfortran.dg/vect/vect-8.f90          |  3 +-\n gcc/testsuite/lib/target-supports.exp              | 62 ++++++++++++++++++++++\n 7 files changed, 75 insertions(+), 5 deletions(-)","diff":"diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi\nindex 4f25268..e09bca1 100644\n--- a/gcc/doc/sourcebuild.texi\n+++ b/gcc/doc/sourcebuild.texi\n@@ -1508,6 +1508,12 @@ Target supports conversion from @code{float} to @code{signed int}.\n @item vect_floatuint_cvt\n Target supports conversion from @code{float} to @code{unsigned int}.\n \n+@item vect_intdouble_cvt\n+Target supports conversion from @code{signed int} to @code{double}.\n+\n+@item vect_doubleint_cvt\n+Target supports conversion from @code{double} to @code{signed int}.\n+\n @item vect_max_reduc\n Target supports max reduction for vectors.\n @end table\ndiff --git a/gcc/testsuite/gcc.dg/vect/pr66251.c b/gcc/testsuite/gcc.dg/vect/pr66251.c\nindex 7f0c4bc..26afbc9 100644\n--- a/gcc/testsuite/gcc.dg/vect/pr66251.c\n+++ b/gcc/testsuite/gcc.dg/vect/pr66251.c\n@@ -1,7 +1,7 @@\n /* { dg-require-effective-target vect_int } */\n /* { dg-require-effective-target vect_double } */\n-/* { dg-require-effective-target vect_floatint_cvt } */\n-/* { dg-require-effective-target vect_intfloat_cvt } */\n+/* { dg-require-effective-target vect_doubleint_cvt } */\n+/* { dg-require-effective-target vect_intdouble_cvt } */\n /* { dg-require-effective-target vect_pack_trunc } */\n /* { dg-require-effective-target vect_unpack } */\n /* { dg-require-effective-target vect_hw_misalign } */\ndiff --git a/gcc/testsuite/gcc.dg/vect/vect-floatint-conversion-2.c b/gcc/testsuite/gcc.dg/vect/vect-floatint-conversion-2.c\nindex 27d248b..64fab38 100644\n--- a/gcc/testsuite/gcc.dg/vect/vect-floatint-conversion-2.c\n+++ b/gcc/testsuite/gcc.dg/vect/vect-floatint-conversion-2.c\n@@ -36,4 +36,4 @@ main (void)\n   return main1 ();\n }\n \n-/* { dg-final { scan-tree-dump-times \"vectorized 1 loops\" 1 \"vect\" { target vect_floatint_cvt } } } */\n+/* { dg-final { scan-tree-dump-times \"vectorized 1 loops\" 1 \"vect\" { target vect_doubleint_cvt } } } */\ndiff --git a/gcc/testsuite/gcc.dg/vect/vect-intfloat-conversion-3.c b/gcc/testsuite/gcc.dg/vect/vect-intfloat-conversion-3.c\nindex 6eb4fec..78fc3da 100644\n--- a/gcc/testsuite/gcc.dg/vect/vect-intfloat-conversion-3.c\n+++ b/gcc/testsuite/gcc.dg/vect/vect-intfloat-conversion-3.c\n@@ -35,4 +35,4 @@ int main (void)\n   return main1 ();\n }\n \n-/* { dg-final { scan-tree-dump-times \"vectorized 1 loops\" 1 \"vect\" { target vect_intfloat_cvt } } } */\n+/* { dg-final { scan-tree-dump-times \"vectorized 1 loops\" 1 \"vect\" { target vect_intdouble_cvt } } } */\ndiff --git a/gcc/testsuite/gfortran.dg/vect/pr60510.f b/gcc/testsuite/gfortran.dg/vect/pr60510.f\nindex 5e2c085..202c1be 100644\n--- a/gcc/testsuite/gfortran.dg/vect/pr60510.f\n+++ b/gcc/testsuite/gfortran.dg/vect/pr60510.f\n@@ -1,5 +1,6 @@\n ! { dg-do run }\n ! { dg-require-effective-target vect_double }\n+! { dg-require-effective-target vect_intdouble_cvt }\n ! { dg-additional-options \"-fno-inline -ffast-math\" }\n       subroutine foo(a,x,y,n)\n       implicit none\ndiff --git a/gcc/testsuite/gfortran.dg/vect/vect-8.f90 b/gcc/testsuite/gfortran.dg/vect/vect-8.f90\nindex ec95598..8e18be5 100644\n--- a/gcc/testsuite/gfortran.dg/vect/vect-8.f90\n+++ b/gcc/testsuite/gfortran.dg/vect/vect-8.f90\n@@ -704,4 +704,5 @@ CALL track('KERNEL  ')\n RETURN\n END SUBROUTINE kernel\n \n-! { dg-final { scan-tree-dump-times \"vectorized 21 loops\" 1 \"vect\" } }\n+! { dg-final { scan-tree-dump-times \"vectorized 21 loops\" 1 \"vect\" { target { vect_intdouble_cvt } } } }\n+! { dg-final { scan-tree-dump-times \"vectorized 17 loops\" 1 \"vect\" { target { ! vect_intdouble_cvt } } } }\ndiff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp\nindex 539aaaf..4f752ec2 100644\n--- a/gcc/testsuite/lib/target-supports.exp\n+++ b/gcc/testsuite/lib/target-supports.exp\n@@ -3119,6 +3119,68 @@ proc check_effective_target_vect_intfloat_cvt { } {\n     return $et_vect_intfloat_cvt_saved($et_index)\n }\n \n+# Return 1 if the target supports signed double->int conversion\n+#\n+\n+proc check_effective_target_vect_doubleint_cvt { } {\n+    global et_vect_doubleint_cvt_saved\n+    global et_index\n+\n+    if [info exists et_vect_doubleint_cvt_saved($et_index)] {\n+\tverbose \"check_effective_target_vect_doubleint_cvt: using cached result\" 2\n+    } else {\n+\tset et_vect_doubleint_cvt_saved($et_index) 0\n+\tif { (([istarget i?86-*-*] || [istarget x86_64-*-*])\n+\t      && [check_no_compiler_messages vect_doubleint_cvt assembly {\n+\t\t  #ifdef __tune_atom__\n+\t\t  # error No double vectorizer support.\n+\t\t  #endif\n+\t      }])\n+\t     || [istarget aarch64*-*-*]\n+\t     || [istarget spu-*-*]\n+\t     || ([istarget powerpc*-*-*] && [check_vsx_hw_available])\n+\t     || ([istarget mips*-*-*]\n+\t\t && [et-is-effective-target mips_msa]) } {\n+\t    set et_vect_doubleint_cvt_saved($et_index) 1\n+\t}\n+    }\n+\n+    verbose \"check_effective_target_vect_doubleint_cvt:\\\n+\t     returning $et_vect_doubleint_cvt_saved($et_index)\" 2\n+    return $et_vect_doubleint_cvt_saved($et_index)\n+}\n+\n+# Return 1 if the target supports signed int->double conversion\n+#\n+\n+proc check_effective_target_vect_intdouble_cvt { } {\n+    global et_vect_intdouble_cvt_saved\n+    global et_index\n+\n+    if [info exists et_vect_intdouble_cvt_saved($et_index)] {\n+\tverbose \"check_effective_target_vect_intdouble_cvt: using cached result\" 2\n+    } else {\n+\tset et_vect_intdouble_cvt_saved($et_index) 0\n+\tif { (([istarget i?86-*-*] || [istarget x86_64-*-*])\n+\t      && [check_no_compiler_messages vect_intdouble_cvt assembly {\n+\t\t  #ifdef __tune_atom__\n+\t\t  # error No double vectorizer support.\n+\t\t  #endif\n+\t      }])\n+\t     || [istarget aarch64*-*-*]\n+\t     || [istarget spu-*-*]\n+\t     || ([istarget powerpc*-*-*] && [check_vsx_hw_available])\n+\t     || ([istarget mips*-*-*]\n+\t\t && [et-is-effective-target mips_msa]) } {\n+\t    set et_vect_intdouble_cvt_saved($et_index) 1\n+\t}\n+    }\n+\n+    verbose \"check_effective_target_vect_intdouble_cvt:\\\n+\t     returning $et_vect_intdouble_cvt_saved($et_index)\" 2\n+    return $et_vect_intdouble_cvt_saved($et_index)\n+}\n+\n #Return 1 if we're supporting __int128 for target, 0 otherwise.\n \n proc check_effective_target_int128 { } {\n","prefixes":["4/5"]}