]> gcc.gnu.org Git - gcc.git/commitdiff
epilog-1.c: New test.
authorJoey Ye <joey.ye@arm.com>
Mon, 18 Jun 2012 18:10:41 +0000 (19:10 +0100)
committerGreta Yorsh <gretay@gcc.gnu.org>
Mon, 18 Jun 2012 18:10:41 +0000 (19:10 +0100)
gcc/testsuite

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

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

Co-Authored-By: Greta Yorsh <greta.yorsh@arm.com>
From-SVN: r188746

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/epilog-1.c [new file with mode: 0644]

index 392e603df88b4b5ea2baa2fe59e8a1336689e8d7..5c37425104977d2fc8aa61ba9bd3a70de062179c 100644 (file)
@@ -1,3 +1,8 @@
+2012-06-18  Joey Ye <Joey.Ye@arm.com>
+            Greta Yorsh  <Greta.Yorsh@arm.com>
+
+        * gcc.target/arm/epilog-1.c: New test.
+
 2012-06-18  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/53693
diff --git a/gcc/testsuite/gcc.target/arm/epilog-1.c b/gcc/testsuite/gcc.target/arm/epilog-1.c
new file mode 100644 (file)
index 0000000..f97f1eb
--- /dev/null
@@ -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" } } */
This page took 0.074575 seconds and 5 git commands to generate.