From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15658 invoked by alias); 18 Feb 2014 21:18:12 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 15632 invoked by uid 89); 18 Feb 2014 21:18:11 -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,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f182.google.com Received: from mail-vc0-f182.google.com (HELO mail-vc0-f182.google.com) (209.85.220.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 18 Feb 2014 21:18:11 +0000 Received: by mail-vc0-f182.google.com with SMTP id id10so13846725vcb.13 for ; Tue, 18 Feb 2014 13:18:08 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.220.89.4 with SMTP id c4mr23712vcm.53.1392758288838; Tue, 18 Feb 2014 13:18:08 -0800 (PST) Received: by 10.58.195.199 with HTTP; Tue, 18 Feb 2014 13:18:08 -0800 (PST) In-Reply-To: <1392757787-25629-6-git-send-email-philipp.tomsich@theobroma-systems.com> References: <1392757787-25629-1-git-send-email-philipp.tomsich@theobroma-systems.com> <1392757787-25629-6-git-send-email-philipp.tomsich@theobroma-systems.com> Date: Tue, 18 Feb 2014 21:18:00 -0000 Message-ID: Subject: Re: [AArch64 05/14] Add AArch64 'prefetch'-pattern. From: Andrew Pinski To: Philipp Tomsich Cc: GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg01077.txt.bz2 On Tue, Feb 18, 2014 at 1:09 PM, Philipp Tomsich wrote: Can you add a testcase or two for this? Thanks, Andrew > --- > gcc/config/aarch64/aarch64.md | 17 +++++++++++++++++ > gcc/config/arm/types.md | 2 ++ > 2 files changed, 19 insertions(+) > > diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md > index 99a6ac8..b972a1b 100644 > --- a/gcc/config/aarch64/aarch64.md > +++ b/gcc/config/aarch64/aarch64.md > @@ -293,6 +293,23 @@ > [(set_attr "type" "no_insn")] > ) > > +(define_insn "prefetch" > + [(prefetch (match_operand:DI 0 "register_operand" "r") > + (match_operand:QI 1 "const_int_operand" "n") > + (match_operand:QI 2 "const_int_operand" "n"))] > + "" > + "* > +{ > + if (INTVAL(operands[2]) == 0) > + /* no temporal locality */ > + return (INTVAL(operands[1])) ? \"prfm\\tPSTL1STRM, [%0, #0]\" : \"prfm\\tPLDL1STRM, [%0, #0]\"; > + > + /* temporal locality */ > + return (INTVAL(operands[1])) ? \"prfm\\tPSTL1KEEP, [%0, #0]\" : \"prfm\\tPLDL1KEEP, [%0, #0]\"; > +}" > + [(set_attr "type" "prefetch")] > +) > + > (define_insn "trap" > [(trap_if (const_int 1) (const_int 8))] > "" > diff --git a/gcc/config/arm/types.md b/gcc/config/arm/types.md > index cc39cd1..1d1280d 100644 > --- a/gcc/config/arm/types.md > +++ b/gcc/config/arm/types.md > @@ -117,6 +117,7 @@ > ; mvn_shift_reg inverting move instruction, shifted operand by a register. > ; no_insn an insn which does not represent an instruction in the > ; final output, thus having no impact on scheduling. > +; prefetch a prefetch instruction > ; rbit reverse bits. > ; rev reverse bytes. > ; sdiv signed division. > @@ -553,6 +554,7 @@ > call,\ > clz,\ > no_insn,\ > + prefetch,\ > csel,\ > crc,\ > extend,\ > -- > 1.9.0 >