aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/arm/epilog-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/arm/epilog-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/arm/epilog-1.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/arm/epilog-1.c b/gcc-4.9/gcc/testsuite/gcc.target/arm/epilog-1.c
new file mode 100644
index 000000000..f97f1ebea
--- /dev/null
+++ b/gcc-4.9/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" } } */