From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49164 invoked by alias); 5 Sep 2017 18:20:14 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 49152 invoked by uid 89); 5 Sep 2017 18:20:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2036 X-HELO: mail-ua0-f170.google.com Received: from mail-ua0-f170.google.com (HELO mail-ua0-f170.google.com) (209.85.217.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Sep 2017 18:20:07 +0000 Received: by mail-ua0-f170.google.com with SMTP id k23so9871779uaf.4 for ; Tue, 05 Sep 2017 11:20:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=GuNtuAYH7A5xrH/uL3ldtzQSG43lyCiU6EKInFytmGg=; b=tP21S4b+NdFLxOIU4mUMfwWcvZW8uSlj+z/+wOYQYCoCp0wL7fUpxOdFjHleQ3c63S NQdU5ZpZod3AASiLsUHzT7ZRloFY+pkHiKtfy5B48M1jMGOy3yDNUmrmjgXExekhCUGB Enx+6m9vph3mupZLAb3D+4NS+vp+tMNPRRKIHGJOMKUbgyExF+O7D2qX+B8bEWcGsVMP vchA7ra1ML22ztwR9db2mZPQ3kQ6l80/YguwwLQEL+v7ckSmt0objfFVhnnT+pm6283E n5WGuR1kBil+P/BMly8n/P2Y3yQ4AgDnSPI7WNk8+KV9hhQz0QKo1OLmIpTsBsyXuYXR DMCQ== X-Gm-Message-State: AHPjjUhAas2I8WnpYLhHmwRizWDmha/t9qr1XxA+gAZPLmOBq+IEhdN4 B67DIeKCnDCBmBXlgL8xtkNcLwupwE57 X-Google-Smtp-Source: ADKCNb7HOiFkbOVNg0opgUOhyNBrxUVV7mIAzXLS4hC6UJjk2ImsHgPhVSktK7oEuzJFTxyMR0qSvNy8mKr0IjIbZOk= X-Received: by 10.159.60.136 with SMTP id s8mr3216501uai.94.1504635605799; Tue, 05 Sep 2017 11:20:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.81.3 with HTTP; Tue, 5 Sep 2017 11:20:05 -0700 (PDT) In-Reply-To: <59AEE480.5070909@foss.arm.com> References: <59AD6894.7010605@foss.arm.com> <59AEE480.5070909@foss.arm.com> From: Christophe Lyon Date: Tue, 05 Sep 2017 18:20:00 -0000 Message-ID: Subject: Re: [PING**2] [PATCH, ARM] Further improve stack usage on sha512 (PR 77308) To: Kyrill Tkachov Cc: Bernd Edlinger , Wilco Dijkstra , Ramana Radhakrishnan , GCC Patches , Richard Earnshaw , nd Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00294.txt.bz2 On 5 September 2017 at 19:53, Kyrill Tkachov wrote: > > On 05/09/17 18:48, Bernd Edlinger wrote: >> >> On 09/05/17 17:02, Wilco Dijkstra wrote: >>> >>> Bernd Edlinger wrote: >>> >>>> Combine creates an invalid insn out of these two insns: >>> >>> Yes it looks like a latent bug. We need to use >>> arm_general_register_operand >>> as arm_adddi3/subdi3 only allow integer registers. You don't need a new >>> predicate >>> s_register_operand_nv. Also I'd prefer something like >>> arm_general_adddi_operand. >>> >> Thanks, attached is a patch following your suggestion. >> >>> + "TARGET_32BIT && ((!TARGET_NEON && !TARGET_IWMMXT) || >>> reload_completed)" >>> >>> The split condition for adddi3 now looks more accurate indeed, although >>> we could >>> remove the !TARGET_NEON from the split condition as this is always true >>> given >>> arm_adddi3 uses "TARGET_32BIT && !TARGET_NEON". >>> >> No, the split condition does not begin with "&& TARGET_32BIT...". >> Therefore the split is enabled in TARGET_NEON after reload_completed. >> And it is invoked from adddi3_neon for all alternatives without vfp >> registers: >> >> switch (which_alternative) >> { >> case 0: /* fall through */ >> case 3: return "vadd.i64\t%P0, %P1, %P2"; >> case 1: return "#"; >> case 2: return "#"; >> case 4: return "#"; >> case 5: return "#"; >> case 6: return "#"; >> >> >> >>> Also there are more cases, a quick grep suggests *anddi_notdi_di has the >>> same issue. >>> >> Yes, that pattern can be cleaned up in a follow-up patch. >> Note this splitter is invoked from bicdi3_neon as well. >> However I think anddi_notdi_di should be safe as long as it is enabled >> after reload_completed (which is probably a bug). >> > > Thanks, that's what I had in mind in my other reply. > This is ok if testing comes back ok. > I've submitted the patch for testing, I'll let you know about the results. Christophe > Kyrill > > >> Bernd. >> >>> Wilco >>> >