[{"id":604593,"web_url":"http://patchwork.ozlabs.org/comment/604593/","msgid":"<52151CD7.80004@redhat.com>","list_archive_url":null,"date":"2013-08-21T20:02:31","subject":"Re: [PATCH i386 1/8] [AVX512] Adjust register classes.","submitter":{"id":3950,"url":"http://patchwork.ozlabs.org/api/people/3950/","name":"Richard Henderson","email":"rth@redhat.com"},"content":"On 08/21/2013 11:28 AM, Kirill Yukhin wrote:\n>>> +\t  && (mode == XImode\n>>> +\t      || VALID_AVX512F_REG_MODE (mode)\n>>> +\t      || VALID_AVX512F_SCALAR_MODE (mode)))\n>>> +\treturn true;\n>>> +\n>>> +      /* In xmm16-xmm31 we can store only 512 bit modes.  */\n>>> +      if (EXT_REX_SSE_REGNO_P (regno))\n>>> +\treturn false;\n>>\n>> You're rejecting scalar modes here.  Not what you wanted, surely.\n> Actually, I believe comment for AVX-512 part is confusing.\n> We're not rejecting scalar modes, VALID_AVX512F_SCALAR_MODE allows that.\n> We are rejecting all extra SSE registers, when there is no AVX-512 or\n> mode is not fit for it.\n\nYes, I did mis-read the test.  What you have now is correct, but\nI still think it could be improved.  We'll do that with followups.\n\n>  (define_insn \"*movdi_internal\"\n>    [(set (match_operand:DI 0 \"nonimmediate_operand\"\n> -    \"=r  ,o  ,r,r  ,r,m ,*y,*y,?*y,?m,?r ,?*Ym,*x,*x,*x,m ,?r ,?r,?*Yi,?*Ym,?*Yi\")\n> +    \"=r  ,o  ,r,r  ,r,m ,*y,*y,?*y,?m,?r ,?*Ym,*v,*v,*v,m ,?r ,?r,?*Yi,?*Ym,?*Yi\")\n>  \t(match_operand:DI 1 \"general_operand\"\n> -    \"riFo,riF,Z,rem,i,re,C ,*y,m  ,*y,*Yn,r   ,C ,*x,m ,*x,*Yj,*x,r   ,*Yj ,*Yn\"))]\n> +    \"riFo,riF,Z,rem,i,re,C ,*y,m  ,*y,*Yn,r   ,C ,*v,m ,*v,*Yj,*v,r   ,*Yj ,*Yn\"))]\n>    \"!(MEM_P (operands[0]) && MEM_P (operands[1]))\"\n>  {\n>    switch (get_attr_type (insn))\n> @@ -1896,6 +1964,8 @@\n>  \t  return \"%vmovq\\t{%1, %0|%0, %1}\";\n>  \tcase MODE_TI:\n>  \t  return \"%vmovdqa\\t{%1, %0|%0, %1}\";\n> +\tcase MODE_XI:\n> +\t  return \"vmovdqa64\\t{%g1, %g0|%g0, %g1}\";\n>  \n>  \tcase MODE_V2SF:\n>  \t  gcc_assert (!TARGET_AVX);\n> @@ -1989,7 +2059,11 @@\n>       (cond [(eq_attr \"alternative\" \"2\")\n>  \t      (const_string \"SI\")\n>  \t    (eq_attr \"alternative\" \"12,13\")\n> -\t      (cond [(ior (not (match_test \"TARGET_SSE2\"))\n> +\t      (cond [(ior (match_test \"EXT_REX_SSE_REGNO_P (REGNO (operands[0]))\")\n> +\t\t\t  (and (match_test \"REG_P (operands[1])\")\n> +\t\t\t       (match_test \"EXT_REX_SSE_REGNO_P (REGNO (operands[1]))\")))\n> +\t\t       (const_string \"XI\")\n> +\t\t     (ior (not (match_test \"TARGET_SSE2\"))\n>  \t\t\t  (match_test \"TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL\"))\n>  \t\t       (const_string \"V4SF\")\n>  \t\t     (match_test \"TARGET_AVX\")\n\nBetter.  And while it produces the correct results, using match_operand would\nbe better than embedding a reference to operands within a match_test.\n\nBut since I don't want to see another 2000 line patch, I'd like you to address\nthis with a followup as well.\n\nThe patch is ok to commit.\n\n\nr~","headers":{"Return-Path":"<gcc-patches-return-347229-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"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(Client CN \"localhost\", Issuer \"www.qmailtoaster.com\" (not verified))\n\tby ozlabs.org (Postfix) with ESMTPS id 853132C009A\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 22 Aug 2013 06:03:01 +1000 (EST)","(qmail 13704 invoked by alias); 21 Aug 2013 20:02:37 -0000","(qmail 13657 invoked by uid 89); 21 Aug 2013 20:02:37 -0000","from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by\n\tsourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP;\n\tWed, 21 Aug 2013 20:02:36 +0000","from int-mx02.intmail.prod.int.phx2.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\tby\n\tmx1.redhat.com (8.14.4/8.14.4) with ESMTP id\n\tr7LK2YnX014814\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA\n\tbits=256 verify=OK); Wed, 21 Aug 2013 16:02:35 -0400","from anchor.twiddle.net (vpn-55-147.rdu2.redhat.com\n\t[10.10.55.147])\tby int-mx02.intmail.prod.int.phx2.redhat.com\n\t(8.13.8/8.13.8) with ESMTP id r7LK2W04002287;\n\tWed, 21 Aug 2013 16:02:33 -0400"],"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:message-id:date:from:mime-version:to:cc:subject:references\n\t:in-reply-to:content-type:content-transfer-encoding; q=dns; s=\n\tdefault; b=l96OjqNNfu3Wc35Fdy2oIzQkf+2FCXvRApxunsUiUFy8Uj3JbyZc9\n\teg7oSU4iNVxeits5HckRdRAZmeKR3Qrg2XmNmeV90HI861WQQPudYWRnMBx4r1aX\n\tLft62rYCrF9LEPmW/nBEnITq1yNhCM83hIsUV5xaBvyHpuybhI5anM=","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:message-id:date:from:mime-version:to:cc:subject:references\n\t:in-reply-to:content-type:content-transfer-encoding; s=default;\n\tbh=r5Q/xz66MFn4thP/VE8rnJ5DE6E=; b=jkKox1RloE6kpDETV2L78c3zVKbt\n\tPcSQoyFh+kOoU5s2DeeG21ojCs9soQdcOWqA5KyQDJ/Qf78HhqbTKQn+0UpQN0h1\n\t9SWwg9hEizQBXJK0BGlVgjakBgAW7xyWbDwtJepRb24koCS4jxcaTEJkso7tfZOc\n\tELRxZWQn6MOZ/DQ=","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-##L=##H@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-Spam-SWARE-Status":"No, score=-8.4 required=5.0 tests=AWL, BAYES_00,\n\tKHOP_THREADED, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL,\n\tRP_MATCHES_RCVD, SPF_HELO_PASS,\n\tSPF_PASS autolearn=ham version=3.3.2","Message-ID":"<52151CD7.80004@redhat.com>","Date":"Wed, 21 Aug 2013 13:02:31 -0700","From":"Richard Henderson <rth@redhat.com>","User-Agent":"Mozilla/5.0 (X11; Linux x86_64;\n\trv:17.0) Gecko/20130805 Thunderbird/17.0.8","MIME-Version":"1.0","To":"Kirill Yukhin <kirill.yukhin@gmail.com>","CC":"ubizjak@gmail.com, jakub@redhat.com, vmakarov@redhat.com,\n\tgcc-patches@gcc.gnu.org","Subject":"Re: [PATCH i386 1/8] [AVX512] Adjust register classes.","References":"<CAGs3RfuFxPd-Q-q_MK_YtbWd6=oXdzFN8MHngt3u5m9_GjFGXA@mail.gmail.com>\n\t<20130807200725.GB42201@msticlxl57.ims.intel.com>\n\t<521286F4.5010405@redhat.com>\n\t<20130820174818.GB8369@msticlxl57.ims.intel.com>\n\t<5213B35B.4030903@redhat.com>\n\t<20130821182812.GA45298@msticlxl57.ims.intel.com>","In-Reply-To":"<20130821182812.GA45298@msticlxl57.ims.intel.com>","Content-Type":"text/plain; charset=ISO-8859-1","Content-Transfer-Encoding":"7bit"}},{"id":604778,"web_url":"http://patchwork.ozlabs.org/comment/604778/","msgid":"<20130822060753.GA46185@msticlxl57.ims.intel.com>","list_archive_url":null,"date":"2013-08-22T06:07:53","subject":"Re: [PATCH i386 1/8] [AVX512] Adjust register classes.","submitter":{"id":8335,"url":"http://patchwork.ozlabs.org/api/people/8335/","name":"Kirill Yukhin","email":"kirill.yukhin@gmail.com"},"content":"Hello,\n\n> The patch is ok to commit.\n\nThanks a lot! Checked in to main trunk: http://gcc.gnu.org/ml/gcc-cvs/2013-08/msg00524.html\n\n--\nK","headers":{"Return-Path":"<gcc-patches-return-347246-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"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(Client CN \"localhost\", Issuer \"www.qmailtoaster.com\" (not verified))\n\tby ozlabs.org (Postfix) with ESMTPS id 04BF62C0091\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 22 Aug 2013 16:08:34 +1000 (EST)","(qmail 20940 invoked by alias); 22 Aug 2013 06:08:26 -0000","(qmail 20923 invoked by uid 89); 22 Aug 2013 06:08:25 -0000","from mail-pa0-f46.google.com (HELO mail-pa0-f46.google.com)\n\t(209.85.220.46) by sourceware.org\n\t(qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP;\n\tThu, 22 Aug 2013 06:08:24 +0000","by mail-pa0-f46.google.com with SMTP id fa1so1728370pad.5 for\n\t<gcc-patches@gcc.gnu.org>; Wed, 21 Aug 2013 23:08:23 -0700 (PDT)","from msticlxl57.ims.intel.com (fmdmzpr03-ext.fm.intel.com.\n\t[192.55.54.38]) by mx.google.com with ESMTPSA id\n\tnj9sm12603121pbc.13.1969.12.31.16.00.00 (version=TLSv1\n\tcipher=RC4-SHA bits=128/128); Wed, 21 Aug 2013 23:08:22 -0700 (PDT)"],"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:date\n\t:from:to:cc:subject:message-id:references:mime-version\n\t:content-type:in-reply-to; q=dns; s=default; b=bvrmTGtPYm7wSpJt2\n\t4NgkVHdVFwqSsN9oELOiWVrGW7IvKJ90hccgWcTxF2qJ66DRT/9kYxxbznSutZCG\n\tjJEu23qqSlcwQPUribs2zj0KfgIsnHLxAxXEhkutebIpSNCjLomLmzI6zDTcKjLv\n\ttS5BR+5Vpr7Pk/6TXazavhGpKE=","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:date\n\t:from:to:cc:subject:message-id:references:mime-version\n\t:content-type:in-reply-to; s=default; bh=HtOPHfdG7Dw+v7oEIJyYRVu\n\tZBRA=; b=ZAUfFPTIvuYPpZVH2eui+SFrJKY6iDiktax8l1n4Qx/rDBCN7d6j3zo\n\thJQmwiEtggaRfwqk5n4Kik/ukl29meq1SvOBYlrN1Lc1mp2dBpD1l+s75BCUWez4\n\tvU5/tMJnlzm+pa+5oe5BMSGTxEoI5kVvcn+2ORXOI3QZ9geRlFBI=","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-##L=##H@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-Spam-SWARE-Status":"No, score=-2.5 required=5.0 tests=AWL, BAYES_00,\n\tFREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE,\n\tSPF_PASS autolearn=ham version=3.3.2","X-Received":"by 10.68.191.36 with SMTP id gv4mr3607914pbc.167.1377151703345;\n\tWed, 21 Aug 2013 23:08:23 -0700 (PDT)","Date":"Thu, 22 Aug 2013 10:07:53 +0400","From":"Kirill Yukhin <kirill.yukhin@gmail.com>","To":"Richard Henderson <rth@redhat.com>","Cc":"ubizjak@gmail.com, jakub@redhat.com, vmakarov@redhat.com,\n\tgcc-patches@gcc.gnu.org","Subject":"Re: [PATCH i386 1/8] [AVX512] Adjust register classes.","Message-ID":"<20130822060753.GA46185@msticlxl57.ims.intel.com>","References":"<CAGs3RfuFxPd-Q-q_MK_YtbWd6=oXdzFN8MHngt3u5m9_GjFGXA@mail.gmail.com>\n\t<20130807200725.GB42201@msticlxl57.ims.intel.com>\n\t<521286F4.5010405@redhat.com>\n\t<20130820174818.GB8369@msticlxl57.ims.intel.com>\n\t<5213B35B.4030903@redhat.com>\n\t<20130821182812.GA45298@msticlxl57.ims.intel.com>\n\t<52151CD7.80004@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<52151CD7.80004@redhat.com>","User-Agent":"Mutt/1.5.21 (2010-09-15)"}}]