From 8b160d504a8c41f2738827d18f4eeab326cef8ec Mon Sep 17 00:00:00 2001 From: Edmar Wienskoski Date: Mon, 13 Jun 2011 18:10:31 +0000 Subject: [PATCH] * gcc.target/powerpc/outofline_rnreg.c: New testcase. From-SVN: r174995 --- gcc/testsuite/ChangeLog | 4 ++++ .../gcc.target/powerpc/outofline_rnreg.c | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 gcc/testsuite/gcc.target/powerpc/outofline_rnreg.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6081160644e..1d9bc22490d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-06-13 Edmar Wienskoski + + * gcc.target/powerpc/outofline_rnreg.c: New testcase. + 2011-06-13 H.J. Lu * gcc.dg/h8300-bit-insn-ice2.c: Remove duplicated lines. diff --git a/gcc/testsuite/gcc.target/powerpc/outofline_rnreg.c b/gcc/testsuite/gcc.target/powerpc/outofline_rnreg.c new file mode 100644 index 00000000000..a80a46f4022 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/outofline_rnreg.c @@ -0,0 +1,15 @@ +/* Test that registers used by out of line restore functions does not get renamed. + AIX, and 64 bit targets uses r1, which rnreg stays away from. + Linux 32 bits targets uses r11, which is susceptible to be renamed */ +/* { dg-do compile } */ +/* { dg-require-effective-target ilp32 } */ +/* { dg-options "-Os -frename-registers -fdump-rtl-rnreg" } */ +/* "* renamed" or "* no available better choice" results are not acceptable */ +/* { dg-final { scan-rtl-dump-not "Register 11 in insn *" "rnreg" { target powerpc*-*-linux* } } } */ +/* { dg-final { cleanup-rtl-dump "rnreg" } } */ +int +calc (int j) +{ + if (j<=1) return 1; + return calc(j-1)*(j+1); +} -- 2.30.2