Really add the test this time...
authorWilco Dijkstra <wdijkstr@arm.com>
Fri, 21 Oct 2016 17:27:15 +0000 (17:27 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Fri, 21 Oct 2016 17:27:15 +0000 (17:27 +0000)
    testsuite/
* gcc.target/aarch64/test_frame_17.c: New test.

From-SVN: r241421

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/test_frame_17.c [new file with mode: 0644]

index e3726c772accea750a5258352ee70aab4b8571fa..2a67241d4b02a2e9193960a94ec3e6397d629345 100644 (file)
@@ -2,6 +2,10 @@
 
        * gcc.target/aarch64/test_frame_17.c: New test.
 
+2016-10-21  Wilco Dijkstra  <wdijkstr@arm.com>
+
+       * gcc.target/aarch64/test_frame_17.c: New test.
+
 2016-10-21  Andris Pavenis  <andris.pavenis@iki.fi>
 
        PR preprocessor/71681
diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_17.c b/gcc/testsuite/gcc.target/aarch64/test_frame_17.c
new file mode 100644 (file)
index 0000000..c214431
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 --save-temps" } */
+
+/* Test reuse of stack adjustment temporaries.  */
+
+void foo ();
+
+int reuse_mov (int i)
+{
+  int arr[1025];
+  return arr[i];
+}
+
+int no_reuse_mov (int i)
+{
+  int arr[1025];
+  foo ();
+  return arr[i];
+}
+
+/* { dg-final { scan-assembler-times "mov\tx16, \[0-9\]+" 3 } } */