From patchwork Tue Jul 22 11:23:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 372441 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 3B5DD140119 for ; Tue, 22 Jul 2014 21:23:56 +1000 (EST) 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=fxLOp+O4AtoaymAguKmGrTWjaSr7hxy4ChPwlCcRIxY PwcbAtSXRwBvPBssf8thkW1IuI76iHr6Aejg6ClBBNxHTEPU6E7pu4TxbwUv80X2 KYEMnDkf7SzORfUZyuhr3EhKlhqr9UXtGHw5WjO4Ar+dt8tmSlJp3Bz7bKIcHSmA = 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=NJL0KLBmeDFUeMFrzx3pBgMLAOo=; b=Bh8GuBBXiliKo+mvW f1bOLZxm6SMGzTTcQ6eIXrFg11GA04MoQXM2HO2ZfIgny1ui0iGdixmhlGtNquIb cKqihzBGF6CwVOgVheFqK7+aXk1GZM57RiXZan2swpNRq4e48PyhfLdLe0XAx1ut /1+4hoRO2ugdlEuVIHeaFUH95w= Received: (qmail 19299 invoked by alias); 22 Jul 2014 11:23: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 19262 invoked by uid 89); 22 Jul 2014 11:23:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 22 Jul 2014 11:23:44 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Tue, 22 Jul 2014 12:23:41 +0100 Received: from [10.1.208.24] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 22 Jul 2014 12:23:40 +0100 Message-ID: <53CE49BB.9050507@arm.com> Date: Tue, 22 Jul 2014 12:23:39 +0100 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: GCC Patches CC: Marcus Shawcroft Subject: [PATCH][AArch64][1/2] Remove UNSPEC_CLS and use clrsb RTL code in its' place X-MC-Unique: 114072212234107801 X-IsSubscribed: yes Hi all, I noticed that we use UNSPEC_CLS for the clrsb optab when we could be using the RTL code for it. I don't see any reason not to use the RTL code and some execution tests confirm that the cls instruction implements the expected clrsb semantics. This patch removes the UNSPEC_CLS definition and usage. Bootstrapped and tested on aarch64-linux. Ok for trunk? Thanks, Kyrill 2014-07-22 Kyrylo Tkachov * config/aarch64/aarch64.md: Delete UNSPEC_CLS. (clrsb2): Use clrsb RTL code instead of UNSPEC_CLS. commit 9840d6c97f3413355852995a5bb7273e10acc1b8 Author: Kyrylo Tkachov Date: Tue Jul 15 15:23:59 2014 +0100 [AArch64] Remove UNSPEC_CLS, use clrsb RTL code diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 042a3b5..0adec11 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -67,7 +67,6 @@ (define_c_enum "unspec" [ UNSPEC_CASESI - UNSPEC_CLS UNSPEC_CRC32B UNSPEC_CRC32CB UNSPEC_CRC32CH @@ -2863,7 +2862,7 @@ (define_insn "clrsb2" [(set (match_operand:GPI 0 "register_operand" "=r") - (unspec:GPI [(match_operand:GPI 1 "register_operand" "r")] UNSPEC_CLS))] + (clrsb:GPI (match_operand:GPI 1 "register_operand" "r")))] "" "cls\\t%0, %1" [(set_attr "type" "clz")]