From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id AA151385F02A for ; Sat, 21 Mar 2020 02:42:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AA151385F02A Received: by mail-pg1-x530.google.com with SMTP id d17so3443488pgo.0 for ; Fri, 20 Mar 2020 19:42:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gTM44Z7v2tGSt208SIn9eNRlIeZQqggNp7ME4AXqmJk=; b=HbW3ghZ12kFioENbq7spcJEAEEyw5/Gj0nGiPq7nW5HFiRovN9dq81En7Oh3Y8YzJN VCWpDAp10WSXJ0YXHQFj7q+dv6qv+1kajBxV+Dxn4K/7ILSlhsseiMjWOh3xT7N7kpUL XDCWjq69MqkGNW/vv1yV3W098Jez81hpnhlNUH8lLimCx6h7UiOWCsx/7htSEGE5JPO+ GdfuTCir8/V4NGd9yVhJhSOmQr83XRO5jGfEW1DFxIMiqc02M07mTL0VQqxlIRanAE82 KOAbo7xHGI6WZDy4tXUtMF8j1Ic0TVOy0tl4AavwYuJ+dOF4faqHdNKEOIQ+APJivbs4 W3RQ== X-Gm-Message-State: ANhLgQ03aHAmMKSLACT8xUGA0BP2oBZa+x5sfy9EmLxgZpW8v+B0KtMy BSkKrfcYVjbWF7xU6dLVyhTPb2FFj2w= X-Google-Smtp-Source: ADFU+vs3nDKazSUB8hQZPFoGMM9Toxf3NY3EJkToaCL4v+xU64IsTlr+Ew3PVDxy8oM1jp6R6SaoPQ== X-Received: by 2002:a63:f243:: with SMTP id d3mr11383543pgk.254.1584758556269; Fri, 20 Mar 2020 19:42:36 -0700 (PDT) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id c83sm6772831pfb.44.2020.03.20.19.42.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Mar 2020 19:42:35 -0700 (PDT) From: Richard Henderson To: gcc-patches@gcc.gnu.org Cc: richard.earnshaw@arm.com, richard.sandiford@arm.com, marcus.shawcroft@arm.com, kyrylo.tkachov@arm.com, Wilco.Dijkstra@arm.com Subject: [PATCH v2 2/9] aarch64: Accept zeros in add3_carryin Date: Fri, 20 Mar 2020 19:42:24 -0700 Message-Id: <20200321024231.13778-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200321024231.13778-1-richard.henderson@linaro.org> References: <20200321024231.13778-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-27.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Mar 2020 02:42:38 -0000 The expander and the insn pattern did not match, leading to recognition failures in expand. * config/aarch64/aarch64.md (*add3_carryin): Accept zeros. --- gcc/config/aarch64/aarch64.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index b9ae51e48dd..a996a5f1c39 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -2606,16 +2606,17 @@ "" ) -;; Note that add with carry with two zero inputs is matched by cset, -;; and that add with carry with one zero input is matched by cinc. +;; While add with carry with two zero inputs will be folded to cset, +;; and add with carry with one zero input will be folded to cinc, +;; accept the zeros during initial expansion. (define_insn "*add3_carryin" [(set (match_operand:GPI 0 "register_operand" "=r") (plus:GPI (plus:GPI (match_operand:GPI 3 "aarch64_carry_operation" "") - (match_operand:GPI 1 "register_operand" "r")) - (match_operand:GPI 2 "register_operand" "r")))] + (match_operand:GPI 1 "aarch64_reg_or_zero" "rZ")) + (match_operand:GPI 2 "aarch64_reg_or_zero" "rZ")))] "" "adc\\t%0, %1, %2" [(set_attr "type" "adc_reg")] -- 2.20.1