From c82bc7eddab18bdbcaccc4e23f70792e0a75490e Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Fri, 21 Oct 2016 17:27:15 +0000 Subject: [PATCH] Really add the test this time... testsuite/ * gcc.target/aarch64/test_frame_17.c: New test. From-SVN: r241421 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.target/aarch64/test_frame_17.c | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/test_frame_17.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e3726c7..2a67241 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -2,6 +2,10 @@ * gcc.target/aarch64/test_frame_17.c: New test. +2016-10-21 Wilco Dijkstra + + * gcc.target/aarch64/test_frame_17.c: New test. + 2016-10-21 Andris Pavenis 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 index 0000000..c214431 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/test_frame_17.c @@ -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 } } */ -- 2.7.4