From patchwork Mon Aug 2 10:09:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Resubmit/Ping^n ARM ldm/stm peepholes Date: Mon, 02 Aug 2010 00:09:37 -0000 From: Bernd Schmidt X-Patchwork-Id: 60528 Message-Id: <4C569961.8040803@codesourcery.com> To: Richard Earnshaw Cc: GCC Patches (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" } } */