From patchwork Wed Jul 15 13:44:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 495848 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B89851402A9 for ; Wed, 15 Jul 2015 23:44:56 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=WwLnZMJ8; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=u8dHvq1rVmzy/bfuRoFGM5KjjijRueVTYqR5zY+Y9iM 9T49XyiK2FWX5oP0lC/tCz3+27XtXOFQzltXQ4cXJC/7SZSFbMy8o0/R6bsytSC1 WueZvj3DEKzTGi+gFODl+q19ykYbDn7cff+tSHYP/3hfOCKj8l3BC3XUIAtEsMy4 = 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 :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=XV38WIN71/3UtsJ83clanXg06Q0=; b=WwLnZMJ8jd+QrXqcR 7uWJDWcy9TDpXxQEQ5BZIOInLohH/I+8HHtFhQ8aEU8crriGzM1q4r/jHwpiYdOD C2MSRkMGu0H8bjlq45/sZccbPEKaX3ojxY4pLQi6Wdac6DlCArr+oyiZOIiEPvWp Ey25soeSeowq+fV6qY9Q9WZYGk= Received: (qmail 88659 invoked by alias); 15 Jul 2015 13:44:48 -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 88647 invoked by uid 89); 15 Jul 2015 13:44:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Jul 2015 13:44:46 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-28-TueqOJ9HQweDTAclx2l0nA-1; Wed, 15 Jul 2015 14:44:41 +0100 Received: from [10.2.207.50] ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 15 Jul 2015 14:44:40 +0100 Message-ID: <55A663C8.4070201@arm.com> Date: Wed, 15 Jul 2015 14:44:40 +0100 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: GCC Patches CC: Marcus Shawcroft , Richard Earnshaw , James Greenhalgh Subject: [PATCH][AArch64] Use cinc mnemonic for *csinc2_insn X-MC-Unique: TueqOJ9HQweDTAclx2l0nA-1 X-IsSubscribed: yes Hi all, This pattern performs a csinc of the same register in both operands. This form can be written using the shorter alias CINC. The ARMv8-A ARM says: "CINC , , is equivalent to CSINC , , , invert()" So the patch switches the condition output modifier from 'M' to the inverse 'm'. I don't think we emit cinc anywhere else in aarch64.md so this will exercise the assembler a tiny bit more (no fallout detected in my testing) and make the output a bit more concise. Again, this is an alias, not a different instruction, so there are no performance/behaviour implications Bootstrapped and tested on aarch64. Ok for trunk? Thanks, Kyrill 2015-07-15 Kyrylo Tkachov * config/aarch64/aarch64.md (*csinc2_insn): Use cinc mnemonic. commit ec05547074dd575471ebafdd10975f438e3361f6 Author: Kyrylo Tkachov Date: Wed Jul 8 11:04:47 2015 +0100 [AArch64] Use cinc mnemonic for *csinc2_insn diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 300537e..57a3360 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -3036,7 +3036,7 @@ (define_insn "*csinc2_insn" (plus:GPI (match_operand 2 "aarch64_comparison_operation" "") (match_operand:GPI 1 "register_operand" "r")))] "" - "csinc\\t%0, %1, %1, %M2" + "cinc\\t%0, %1, %m2" [(set_attr "type" "csel")] )