From patchwork Tue May 17 09:06:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Greenhalgh X-Patchwork-Id: 67931 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1960592qge; Tue, 17 May 2016 02:07:45 -0700 (PDT) X-Received: by 10.66.172.165 with SMTP id bd5mr227763pac.128.1463476065385; Tue, 17 May 2016 02:07:45 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 87si3320409pfp.114.2016.05.17.02.07.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 May 2016 02:07:45 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-427436-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-427436-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-427436-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=gL/h+/GRpa2FNEDb7/Iyb5W/SPJHfVFM12D2QxcUS0iu0d8XZd H2aBoy7lMpCzK1LrWKRPF6TwMn3bY1tAx9JHGRWVJegGJPdR0ZmUDSQw4ltaTWyq plSz+RAm1i2pJW3tk70p4jTHdJshpXATbjN2876N54BWAZCrPt5EV050M= 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 :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=ipAZ4IZgQKJihAnjpJt3LX68jJE=; b=bXI+FozQfaBdtNDxZkvp zmf2h6A4M5I21w06GCKwGlevUm4t8czBS9SXzVljXfmGKgIfjRN71Qx9RSJbpIew hA8PHGt0blvDERa5MtSkxBGHzIpnPFaspy4YpjhMuHd9HtA2DiMcYnN1YzcSyQIZ zvu4M2O+jmSRk0AAcs4rgFE= Received: (qmail 20774 invoked by alias); 17 May 2016 09:07:33 -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 20705 invoked by uid 89); 17 May 2016 09:07:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:7e00, H*RU:7e00, H*r:10.174.65, Hx-spam-relays-external:sk:AM1FFO1 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 May 2016 09:07:21 +0000 Received: from emea01-db3-obe.outbound.protection.outlook.com (mail-db3lrp0080.outbound.protection.outlook.com [213.199.154.80]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-23-6CQHzPRiRh6-IH0YWc_RUQ-1; Tue, 17 May 2016 10:07:16 +0100 Received: from AM4PR08CA0014.eurprd08.prod.outlook.com (10.166.127.24) by AM2PR08MB0228.eurprd08.prod.outlook.com (10.161.131.16) with Microsoft SMTP Server (TLS) id 15.1.497.12; Tue, 17 May 2016 09:07:13 +0000 Received: from AM1FFO11FD051.protection.gbl (2a01:111:f400:7e00::176) by AM4PR08CA0014.outlook.office365.com (2603:10a6:200:1a::24) with Microsoft SMTP Server (TLS) id 15.1.497.12 via Frontend Transport; Tue, 17 May 2016 09:07:13 +0000 Received: from nebula.arm.com (217.140.96.140) by AM1FFO11FD051.mail.protection.outlook.com (10.174.65.214) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Tue, 17 May 2016 09:07:04 +0000 Received: from e107456-lin.cambridge.arm.com (10.1.2.79) by mail.arm.com (10.1.106.66) with Microsoft SMTP Server id 14.3.279.2; Tue, 17 May 2016 10:06:44 +0100 From: James Greenhalgh To: CC: , , Subject: [Patch AArch64] Simplify reduc_plus_scal_v2[sd]f sequence Date: Tue, 17 May 2016 10:06:42 +0100 Message-ID: <1463476002-513-1-git-send-email-james.greenhalgh@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(377424004)(199003)(8676002)(110136002)(86362001)(229853001)(84326002)(189998001)(2351001)(4326007)(586003)(87936001)(568964002)(5008740100001)(33646002)(104016004)(36756003)(2476003)(5003600100002)(1220700001)(6806005)(50986999)(4610100001)(50226002)(77096005)(8936002)(11100500001)(5000100001)(450100001)(106466001)(92566002)(2906002)(19580405001)(19580395003)(5890100001)(512874002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR08MB0228; H:nebula.arm.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD051; 1:5cZBEeoLG+AZWqPh8hV09Lb3LYJBxOFF4WPynt5sVmXmtPEsqPzjw7MV2n90eWq4JjlLDKdSwWlfbndy1wgivsa5dpZSO3qRCMZ3pDyx5ijktimDBCstIPpC8nKgA4K2OKCPjyFMQ72P7VcpXIiLh9VWr0yUOAqe1lKEHVLvWrUQF1/NnJynheYRH+KSScEskqTpX1dpvgwkcoVAr4zmS5/GdjA8H7JcDLL79rUEfAhXb+rhphG4ViMR51bjehHSlnvd0acl7cUDBsy9MkKWccVnhcZXP0+t8oGXTGWJm36WzoNkRXYAtN072Bf68+Br+oWq5zrDL5zGJ9iP14dEQ67GEnom1lwgVS88pY/FUoU8UYIiCdExPtHqlcEyh1/u4iN99JCSTemhfC5cm30/iArkMh9TXu1EXtak5asCly74t/w737/eeNQcAHclINQoz/xwsLLNxPc+9jpiYdra0etLuh8TSn0ZQfk7ztou9IaS+Ya7cxe9ODi/LrPDKwmN X-MS-Office365-Filtering-Correlation-Id: b7fde340-52ec-407b-3c77-08d37e329db4 X-Microsoft-Exchange-Diagnostics: 1; AM2PR08MB0228; 2:GNhwuUswgkW8O79ghkZiQNF+6pe/8X50CaWSFjRpl+hEXxe9KbgR+9t1E7USjT43KsfIHVW1bpFjedndAG5WVrIjumTtD7gWJyeITxNxO/VHNGEPsVda32rn5ikZsMGcoCAV5LaHUXIG8+ncNnRIcpYyNC1WcwtKgxt2OV6YRrx8AP2ok6eYuAlbBC9Xx/Yn; 3:AeNpNVbcONW17qUXD/Qk14AziRBD4paSGuh5LerVJKiQ0h9iwUnqHdjPG2TAKlQfYDLiXws7afEV47Pa7qjlkypS7p1IcIYiCHKkZY9KHZPfOSA74aH09bMsaKuRM7ZEkV8QTLSVuP5NRdvdXEWcOLulyQtnBxqiZrBFzo1I5+Wsml8GSlh3vwh9r0ow3vtLpuEDTYZxU2hfEnL+1plgbX3Wa+N8bK2GtMeN5japYoVruX2cLqLgpoLtH240apbRouYLeA0zg8768HUNp2pxwg== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:AM2PR08MB0228; X-Microsoft-Exchange-Diagnostics: 1; AM2PR08MB0228; 25:Nq8Lnwv5qypi1A2sWzgcqfevAuU21C/L8gPUylX9rRO1kZBwA+YC4Ua2xdwtID/O4dx+QxuWyii2M51Eiql19Hj2XUjRSfz9M5lNWTP9Q17whD8KpBGIdlKlauDzBAyqV/k04NVQuY9LuCUq7gTtWRzlXASybaNmg8EkpjtcrPxcjgPHG6An3CkZxES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Bfmf9CK4Jd/fKDp6shc9AqD3wDQit77ZoBbeiEyL/JlM26kon0sg9hNMeSgZOx1l6am682ekiIOjHeswkhuMhMAsmKgPEQsO8r1R1jV3S4oUyCg8Flo+6jPq6GDyzOLPPyVBnkcbnz6mePfjuEYZ+/DgUOTsK8UkFhxhrq2QOsm97Qt9oHh3PBVfcJCAhHE5XkXZdALzNR+BInL56NOmKkSFlbW0oK0cokrdeg0YUa7UN0S4BYfdr7SS36R8hii5B9pZFMNw/G2IL3Mz/SGsz/TyofAm/8Rsjj+0ygKhvIUzTkhw6T6lhmGkVlxBMLfGBOT8l6SyfYazGtg5DTw5eK6bY5Kfl6W3CUmEm5+t4WdDYIyu22yD8c9lbZI6/VYp31z6nfqEeoKSmQQzpVa/Ar9inISDnFc5htBXPkkXvfHTC0pzQCjS+BdZiFmEuBthyqWjLQ32MWMVXyjodKA10drUf03FSPRZkQCBHcWn3wMZAr5tMePKbeNAgM3LmuyQ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415293)(102615271)(601004)(2401047)(13024025)(13020025)(13013025)(13023025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:AM2PR08MB0228; BCL:0; PCL:0; RULEID:; SRVR:AM2PR08MB0228; X-Forefront-PRVS: 0945B0CC72 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR08MB0228; 23:LYWyCk4i2SaG7ga42tgOcuF7cI7ggInDf9mCk4/41?= =?us-ascii?Q?7wh7TT/rKd2/Yl2Bqqg77qh/UtVzjjxA4xTiUvW0yBgvmPJMOxkNlIfPMh0/?= =?us-ascii?Q?dw7BY7CCKUTcGACsyRx22m/yN5Jf0P37XDXQWmdwpSnRXWdEOb9hWO55s7/G?= =?us-ascii?Q?+3x9b73TrhfGstng7qP4yH5cvnRYuu5A8nfWZAqzk7/VZa6+K3YFfFiMmzAH?= =?us-ascii?Q?tl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1; AM2PR08MB0228; 5:h5Ohp9YGCiaQATTLmz0N4BGlQCAVYZcmQUH0GQ+2A/niWxd5YouCSpcx1nLipgGYQNrtXuI7RsTmN06UYINUhFySux847NzZySNh+rOqFDYsj8+aFUJjGv6VWXmp3AyLJxOapIWfq1AsHXe686B6CA==; 24:5uXS5S9aKoSwhWmaeVPRgDYK/7hH+/+ZjipCltygf+uXdkS0EGXAzoChm0A8vnRoqwnJn+UqwxGGjPNHdclNFupibPFENyMwoGZkCzB5GS8=; 7:TAWaLBYfFSNXpMogS3rAJGrDw1P4zrQKLSkBIPfF+POlczW7I8AMH4kYvhoEB+wrj0aLsWXvbIieEs5ctKMHS/t/h64G/FBtl8ly6sALvRFXnok5zcf5vfcB2Y0sFT2j6jUg/md/I6XT6ef30p5fz98trNuTVMB1xh7Dc9G75UO6eTUOBkzrlK7VkG51Hi1/; 20:0vaV7N3eTYkl1KLBAup6yWz529KLIBmUzft86YryiAvreWXDSCBoeRd4iCCVXvvxIvLZ+JRFeb29WdE9zfsMg2VTzWRpYbHuaUOCvUClW0K/LL3R9fTcTyXunXU6XkuoD2+AleoEWbvJ/A16tRJe/WQ+zzdLwTKyU3G/qkON5Wo= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2016 09:07:04.6331 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR08MB0228 X-MC-Unique: 6CQHzPRiRh6-IH0YWc_RUQ-1 X-IsSubscribed: yes Hi, This is just a simplification, it probably makes life easier for register allocation in some corner cases and seems the right thing to do. We don't use the internal version elsewhere, so we're safe to delete it and change the types. OK? Bootstrapped on AArch64 with no issues. Thanks, James --- 2016-05-17 James Greenhalgh * config/aarch64/aarch64-simd.md (aarch64_reduc_plus_internal): Rename to... (reduc_plus_scal): ...This, and remove previous implementation. diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index bd73bce..30023f0 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -1989,19 +1989,6 @@ } ) -(define_expand "reduc_plus_scal_" - [(match_operand: 0 "register_operand" "=w") - (match_operand:V2F 1 "register_operand" "w")] - "TARGET_SIMD" - { - rtx elt = GEN_INT (ENDIAN_LANE_N (mode, 0)); - rtx scratch = gen_reg_rtx (mode); - emit_insn (gen_aarch64_reduc_plus_internal (scratch, operands[1])); - emit_insn (gen_aarch64_get_lane (operands[0], scratch, elt)); - DONE; - } -) - (define_insn "aarch64_reduc_plus_internal" [(set (match_operand:VDQV 0 "register_operand" "=w") (unspec:VDQV [(match_operand:VDQV 1 "register_operand" "w")] @@ -2020,9 +2007,9 @@ [(set_attr "type" "neon_reduc_add")] ) -(define_insn "aarch64_reduc_plus_internal" - [(set (match_operand:V2F 0 "register_operand" "=w") - (unspec:V2F [(match_operand:V2F 1 "register_operand" "w")] +(define_insn "reduc_plus_scal_" + [(set (match_operand: 0 "register_operand" "=w") + (unspec: [(match_operand:V2F 1 "register_operand" "w")] UNSPEC_FADDV))] "TARGET_SIMD" "faddp\\t%0, %1."