From patchwork Wed Aug 8 14:18:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramana Radhakrishnan X-Patchwork-Id: 175933 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]) by ozlabs.org (Postfix) with SMTP id EC7782C00A1 for ; Thu, 9 Aug 2012 00:18:54 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1345040336; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=7EB9SXzwJ/fgjRaX7EudMWKszvI=; b=qaTHiLGJxUcP68PIvsMKG7xwpIAeeQ7xP3NTR7ek/GliDfIQpR7uXp26p9+x9g dc7Q1DXXj5YG2S6+6Sn75b60zAyyZXTDRqW9EgzEcDZaLKTHmsNOgcf58El/cSHN hnbZ2zlFPMOY6mFiDpj1AH4JyeWWdBSgwDaRdnV0x+gw8= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=NOxltCGoEyyLu2dh+0O4xJcpzoCPzKxU/tOjRmVjWxqR0U8cor5erG6KJS34Er TVzG09fhAz8yWsrObk9F3T4TlIPCyQudQDUwE8XqSrkSKn10YC7IrbQq9+4mZo1+ NDhdh23/kPmlLlnAYhUI0zC6m9g8VIGFkoBuNZZK+3p7w=; Received: (qmail 18767 invoked by alias); 8 Aug 2012 14:18:49 -0000 Received: (qmail 18756 invoked by uid 22791); 8 Aug 2012 14:18:48 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-qc0-f175.google.com (HELO mail-qc0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Aug 2012 14:18:35 +0000 Received: by qcad10 with SMTP id d10so474987qca.20 for ; Wed, 08 Aug 2012 07:18:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=td65U2gOcuE1RdhaVHji8VUixhuBLCNi7rHt7GDaPH8=; b=mC/eVgC1w6uh9N/GEynnUb1p9+p4smDQmmjRfh/KLo2xmC3S5YC4EXsNxkQYGLQGmI wgd5Wkre1boMV5wcpLK+qZXA9hbbONLoDqBd+PpOg57L2LZy58dwFzhc6FknS0AYFhey Xqioo7M6SFUvX4SFTDjmQJ1+moMn8ZAVnm4nOqQvJGydxV86b1F7XuKwGIAnIQR5RIqH KQiLqtC1TSTv+rJ3aHAyKu/c49kX/r8VWCLcJWZqScke4OJI9yTJaad3wIIFCu3oWSqB X9ZzxGIlPdRir2mxDTw/O+RQ0OJiXqNEoBy/Q07jJw4EySiXjutL+EVSZ9/4AnGyykCK PRIg== MIME-Version: 1.0 Received: by 10.58.32.234 with SMTP id m10mr13811817vei.60.1344435514645; Wed, 08 Aug 2012 07:18:34 -0700 (PDT) Received: by 10.58.187.170 with HTTP; Wed, 8 Aug 2012 07:18:34 -0700 (PDT) In-Reply-To: <501BE78B.8040306@arm.com> References: <501BE78B.8040306@arm.com> Date: Wed, 8 Aug 2012 15:18:34 +0100 Message-ID: Subject: Re: [Patch ARM 1/6] Canonicalize neon_vaba and neon_vabal patterns. From: Ramana Radhakrishnan To: Richard Earnshaw Cc: "gcc-patches@gcc.gnu.org" , Patch Tracking X-Gm-Message-State: ALoCoQlIs1Kxfe7JESEY2ELL6m3P+vVYZWR8dW0mNq2yvkbcp6yu+RWtUN379+OEv6DbWaQmDik8 X-IsSubscribed: yes 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 On 3 August 2012 16:00, Richard Earnshaw wrote: > On 30/07/12 12:43, Ramana Radhakrishnan wrote: >>> Patch 1 fixes up the vaba and vabal patterns to use a canonical RTL >>> form with the first operand to the plus being the more complex one. >> >> This patch canonicalizes the instruction patterns for the >> vaba and vabal intrinsics so that the more complex operand >> to plus is the first operand. This prevents needless >> splitting in combine. >> >> For reference, this was found by the new test in gcc.target/neon/vaba*.c >> and gcc.target/neon/vabal*.c from patch #4. >> >> >> Ok ? >> >> regards, >> Ramana >> >> 2012-07-27 Ramana Radhakrishnan >> >> * config/arm/neon.md (neon_vaba): Change to define_expand. >> (neon_vabal): Likewise. >> (neon_vaba_internal): New internal pattern. >> (neon_vabal_internal): New internal pattern. > > In principle, this is OK. I think you could have achieved the same > effect more simply though by just re-ordering the RTL but keeping the > operand numbers the same. Indeed - this look better ? "TARGET_NEON" "vaba.%T4%#\t%0, %2, %3" [(set (attr "neon_type") @@ -2351,13 +2351,13 @@ (define_insn "neon_vabal" [(set (match_operand: 0 "s_register_operand" "=w") - (plus: (match_operand: 1 "s_register_operand" "0") - (unspec: [(match_operand:VW 2 "s_register_operand" "w") - (match_operand:VW 3 "s_register_operand" "w") - (match_operand:SI 4 "immediate_operand" "i")] - UNSPEC_VABDL)))] + (plus: (unspec: + [(match_operand:VW 2 "s_register_operand" "w") + (match_operand:VW 3 "s_register_operand" "w") + (match_operand:SI 4 "immediate_operand" "i")] UNSPEC_VABDL) + (match_operand: 1 "s_register_operand" "0")))] "TARGET_NEON" - "vabal.%T4%#\t%q0, %P2, %P3" + "vabal.%T4%#\t%q0, %P1, %P2" [(set_attr "neon_type" "neon_vaba")] ) Ramana diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md index 7142c98..9e82564 100644 --- a/gcc/config/arm/neon.md +++ b/gcc/config/arm/neon.md @@ -2337,11 +2337,11 @@ (define_insn "neon_vaba" [(set (match_operand:VDQIW 0 "s_register_operand" "=w") - (plus:VDQIW (match_operand:VDQIW 1 "s_register_operand" "0") - (unspec:VDQIW [(match_operand:VDQIW 2 "s_register_operand" "w") - (match_operand:VDQIW 3 "s_register_operand" "w") - (match_operand:SI 4 "immediate_operand" "i")] - UNSPEC_VABD)))] + (plus:VDQIW (unspec:VDQIW + [(match_operand:VDQIW 2 "s_register_operand" "w") + (match_operand:VDQIW 3 "s_register_operand" "w") + (match_operand:SI 4 "immediate_operand" "i")] UNSPEC_VABD) + (match_operand:VDQIW 1 "s_register_operand" "0")))]