From patchwork Mon Aug 2 10:09:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 60528 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 29B7D1007D2 for ; Mon, 2 Aug 2010 20:09:57 +1000 (EST) Received: (qmail 10663 invoked by alias); 2 Aug 2010 10:09:53 -0000 Received: (qmail 10631 invoked by uid 22791); 2 Aug 2010 10:09:52 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Aug 2010 10:09:47 +0000 Received: (qmail 28549 invoked from network); 2 Aug 2010 10:09:45 -0000 Received: from unknown (HELO ?84.152.249.133?) (bernds@127.0.0.2) by mail.codesourcery.com with ESMTPA; 2 Aug 2010 10:09:45 -0000 Message-ID: <4C569961.8040803@codesourcery.com> Date: Mon, 02 Aug 2010 12:09:37 +0200 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100724 Thunderbird/3.1.1 MIME-Version: 1.0 To: Richard Earnshaw CC: GCC Patches Subject: Re: Resubmit/Ping^n ARM ldm/stm peepholes References: <4BCD9301.2060605@codesourcery.com> <4C346B3C.5020302@codesourcery.com> <1280580386.32159.25.camel@e102346-lin.cambridge.arm.com> In-Reply-To: <1280580386.32159.25.camel@e102346-lin.cambridge.arm.com> 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 (note gcc-patches Cc re-added) On 07/31/2010 02:46 PM, Richard Earnshaw wrote: > On Wed, 2010-07-07 at 12:55 +0100, Bernd Schmidt wrote: >> Here's an updated version of my ldm/stm peepholes patch for current >> trunk. >> Ok? >> > > OK, Thanks! I've taken the liberty of also committing two testcases for it which were missing from the patch submission. They pass my arm-linux tests with march=armv7-a/mthumb, mthumb, and plain ARM. We can still decide whether arm-ldmstm.ml is the master copy or just documentation. Bernd Index: testsuite/gcc.target/arm/pr40457-1.c =================================================================== --- testsuite/gcc.target/arm/pr40457-1.c (revision 0) +++ testsuite/gcc.target/arm/pr40457-1.c (revision 0) @@ -0,0 +1,10 @@ +/* { dg-options "-Os" } */ +/* { dg-do compile } */ + +int bar(int* p) +{ + int x = p[0] + p[1]; + return x; +} + +/* { dg-final { scan-assembler "ldm" } } */ Index: testsuite/gcc.target/arm/pr40457-2.c =================================================================== --- testsuite/gcc.target/arm/pr40457-2.c (revision 0) +++ testsuite/gcc.target/arm/pr40457-2.c (revision 0) @@ -0,0 +1,10 @@ +/* { dg-options "-O2" } */ +/* { dg-do compile } */ + +void foo(int* p) +{ + p[0] = 1; + p[1] = 0; +} + +/* { dg-final { scan-assembler "stm" } } */