From patchwork Tue Oct 22 13:20:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Richard Earnshaw \(lists\)" X-Patchwork-Id: 177153 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp4855190ill; Tue, 22 Oct 2019 06:20:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9jr4JV+mdABGUPmwUg+F+45hdXZrIzseFTBCtjc0ImgYp73DLUFtjINOHXDZ0uv9Jw5zf X-Received: by 2002:aa7:c890:: with SMTP id p16mr3281834eds.296.1571750443572; Tue, 22 Oct 2019 06:20:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571750443; cv=none; d=google.com; s=arc-20160816; b=iMpp8QnmqVW7eU/S2MRB43Cr8uNdMtqYoHXZrjcKLs6PwrPbUDDOIQejPP6YGfkC6K tg9z+1vxd0COqly6a7sYdwYJJqRfjXGWL2l4vQ2EVmtaZgQGZ3hT4Zga5Kk5B0g3///y SsgHIeH2uY5LPlD5RudliiSlTLBFm64ot3I/uwJ6fb+1vzN7NG2YU+oVJnMqJyb9Fl2b WkA3MXoFs+ovbmM8U4Z7QRfUoXz8ZBVL8b1J5LGthM/ABMrQoJU1R73ZaC6hh0EL5FOv QY6WCnnXagckMdUwtVQtbFGQN7MfWo9vjjcO278mMzjXZEOFhQVFk5zfBCQTyrCp1gdM K+nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:date:message-id:subject:from:to :delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature; bh=vH5WglfddDow5h432ZIChjmRINh87rwAyPfNJADNqYs=; b=NDQeB4oQL1Fk+bpvvLnhS5sT5BJQUP0oeSRy2z7zn1DrpD04+tnslNpfJqtdhK3Iij kG1rC3JB07veIZysDpKLDzGz1CvTfVZhgqwX9MWOprJ5E3cltJWKXoKsNzUDY2skQzha U/ZWEsbH0hFrzydxkUtu67ItYg2YdMmH5PX9DJPERzAYTK1Ebod9BK++2gs8r76emuFH GaQ5FycNpnuEm9tLtbW3ena2w4K4cMNzUIvIikM7snRe/h/aNLH9pygibPEv7LZ36i1Q Gmlm+goK1bAk3k2KAbdRCLOL+Y1njhQXkeaXignLDxgQTKPcwxxvAGl/AOc63yZIejwO kZIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="tVA1aWo/"; spf=pass (google.com: domain of gcc-patches-return-511498-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-511498-patch=linaro.org@gcc.gnu.org" Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id z15si4901220edd.8.2019.10.22.06.20.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Oct 2019 06:20:43 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-511498-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 header.s=default header.b="tVA1aWo/"; spf=pass (google.com: domain of gcc-patches-return-511498-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-511498-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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=G3v05XYhA2JV9I8uRT20RLsNyOVGgLKTgrIU7+tb3tdKhLfiyW WiPmADHsHncstQzVlyStShoXuPM2HEPjKEvVEdp5TLZMQMMze92jxtvvryTlwzB8 JrjlMW/R97xHGVAgXaNzzsanG/1Khr0zTZH/bR/7+rqxZZAz1zUwvqgzM= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=SohQgIriOyWsNDHV/fyJjaCVuv0=; b=tVA1aWo/O7Zdwr3qGjvO mh6sk98+soz8tyix7YXMfuCdEgpRbrsmbcq1sczQokrM9YwRXVHeBKtdWIAXTCSi 85bECnPF7Lhnig4ghDvr2UMu7445Grbt8+p/Ltb1J9c7IjpyKsu/wTHHUHkoCUTS 1dGKwNmUB+ORt7Ubwwor6lI= Received: (qmail 106343 invoked by alias); 22 Oct 2019 13:20:31 -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 106334 invoked by uid 89); 22 Oct 2019 13:20:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=duals, LTU, sk:arm_car X-HELO: foss.arm.com Received: from Unknown (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 22 Oct 2019 13:20:29 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 354C11762; Tue, 22 Oct 2019 06:20:22 -0700 (PDT) Received: from e120077-lin.cambridge.arm.com (e120077-lin.cambridge.arm.com [10.2.206.225]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 96A243F71F; Tue, 22 Oct 2019 06:20:20 -0700 (PDT) To: "gcc-patches@gcc.gnu.org" From: "Richard Earnshaw (lists)" Subject: [arm] make arm_carry_operation and arm_borrow_operation duals Message-ID: <19680a87-b219-6773-4c40-a47a693c6f7a@arm.com> Date: Tue, 22 Oct 2019 14:20:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Arm_carry_operation and arm_borrow_operation are duals: given that we have a comparison that returns a result that relies solely in the carry flag one is the inverse of the other. So there's no reason for one to have a CC mode that the other does not have. This patch restores that equivalence. * config/arm/predicates.md (arm_borrow_operation): Handle CC_ADCmode. Committed. diff --git a/gcc/config/arm/predicates.md b/gcc/config/arm/predicates.md index 8a8f10ccb50..267c446c03e 100644 --- a/gcc/config/arm/predicates.md +++ b/gcc/config/arm/predicates.md @@ -398,7 +398,7 @@ (define_special_predicate "arm_borrow_operation" machine_mode ccmode = GET_MODE (op0); if (ccmode == CC_Cmode) return GET_CODE (op) == GEU; - else if (ccmode == CCmode || ccmode == CC_RSBmode) + else if (ccmode == CCmode || ccmode == CC_RSBmode || ccmode == CC_ADCmode) return GET_CODE (op) == LTU; return false; }