diff mbox

[testsuite] new test for arm epilogue

Message ID 001101cd4d68$9fe2c970$dfa85c50$@Yorsh@arm.com
State New
Headers show

Commit Message

Greta Yorsh June 18, 2012, 3:40 p.m. UTC
This test relies on epilogue generated in RTL to provide register liveness
information that enables peephole optimization.

OK for trunk?

Thanks,
Greta


2012-06-18  Joey Ye <Joey.Ye@arm.com>
            Greta Yorsh  <Greta.Yorsh@arm.com>

         * gcc.target/arm/epilog-1.c: New test.

Comments

Richard Earnshaw June 18, 2012, 4:58 p.m. UTC | #1
On 18/06/12 16:40, Greta Yorsh wrote:
> This test relies on epilogue generated in RTL to provide register liveness
> information that enables peephole optimization.
> 
> OK for trunk?
> 
> Thanks,
> Greta
> 
> 
> 2012-06-18  Joey Ye <Joey.Ye@arm.com>
>             Greta Yorsh  <Greta.Yorsh@arm.com>
> 
>          * gcc.target/arm/epilog-1.c: New test.
> 
> 
> test-epilog-1.patch.txt
> 
> 
> diff --git a/gcc/testsuite/gcc.target/arm/epilog-1.c b/gcc/testsuite/gcc.target/arm/epilog-1.c
> new file mode 100644
> index 0000000..f97f1eb
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/arm/epilog-1.c
> @@ -0,0 +1,17 @@
> +/* Register liveness information from epilgoue enables peephole optimization. */
> +/* { dg-do compile } */
> +/* { dg-options "-mthumb -Os" } */
> +/* { dg-require-effective-target arm_thumb2_ok } */
> +
> +volatile int g_k;
> +extern void bar(int, int, int, int);
> +
> +int foo(int a, int b, int c, int d)
> +{
> +  if (g_k & 4) c++;
> +  bar (a, b, c, d);
> +  return 0;
> +}
> +
> +/* { dg-final { scan-assembler-times "lsls.*#29" 1 } } */
> +/* { dg-final { scan-assembler-not "tst" } } */

OK.

R.
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.target/arm/epilog-1.c b/gcc/testsuite/gcc.target/arm/epilog-1.c
new file mode 100644
index 0000000..f97f1eb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/epilog-1.c
@@ -0,0 +1,17 @@ 
+/* Register liveness information from epilgoue enables peephole optimization. */
+/* { dg-do compile } */
+/* { dg-options "-mthumb -Os" } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+
+volatile int g_k;
+extern void bar(int, int, int, int);
+
+int foo(int a, int b, int c, int d)
+{
+  if (g_k & 4) c++;
+  bar (a, b, c, d);
+  return 0;
+}
+
+/* { dg-final { scan-assembler-times "lsls.*#29" 1 } } */
+/* { dg-final { scan-assembler-not "tst" } } */