public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5839] testsuite: Use attribute "noipa" in sibcall tests
@ 2021-12-08 17:51 Hans-Peter Nilsson
  0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2021-12-08 17:51 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:60147c2b7d987f6142bdc1d2ae83e091fc6a5a45

commit r12-5839-g60147c2b7d987f6142bdc1d2ae83e091fc6a5a45
Author: Hans-Peter Nilsson <hp@axis.com>
Date:   Tue Dec 7 06:18:57 2021 +0100

    testsuite: Use attribute "noipa" in sibcall tests
    
    ...instead of attribute "noinline".
    
    For cris-elf, testsuite/gcc.dg/sibcall-3.c and sibcall-4.c "XPASS",
    without sibcalls being implemented.  On inspection, recurser_void2 is
    set to be an assembly-level alias for recurser_void1 as in
    ".set _recurser_void2,_recurser_void1" for both these cases.
    
    IOW, those "__attribute__((noinline))" should be
    "__attribute__((noipa))".  The astute reader will notice that I also
    adjust test-cases where self-recursion should occur: as mentioned in
    sibcall-1.c "self-recursion tail calls are optimized for all targets,
    regardless of presence of sibcall patterns".  But, that optimization
    happens even with "noipa", as observed by the test-cases still passing
    for cris-elf after patching.  Being of a small mind, I like
    consistency, but not all the time, so there's hope.
    
    testsuite:
            * gcc.dg/sibcall-1.c, gcc.dg/sibcall-10.c,
            gcc.dg/sibcall-2.c, gcc.dg/sibcall-3.c,
            gcc.dg/sibcall-4.c, gcc.dg/sibcall-9.c: Replace
            attribute "noinline" with "noipa".

Diff:
---
 gcc/testsuite/gcc.dg/sibcall-1.c  | 2 +-
 gcc/testsuite/gcc.dg/sibcall-10.c | 6 +++---
 gcc/testsuite/gcc.dg/sibcall-2.c  | 2 +-
 gcc/testsuite/gcc.dg/sibcall-3.c  | 6 +++---
 gcc/testsuite/gcc.dg/sibcall-4.c  | 6 +++---
 gcc/testsuite/gcc.dg/sibcall-9.c  | 6 +++---
 6 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/sibcall-1.c b/gcc/testsuite/gcc.dg/sibcall-1.c
index 367ee4374e1..f2bd3ade217 100644
--- a/gcc/testsuite/gcc.dg/sibcall-1.c
+++ b/gcc/testsuite/gcc.dg/sibcall-1.c
@@ -47,7 +47,7 @@ recurser_void (int n)
 
 void *trackpoint;
 
-void __attribute__ ((noinline))
+void __attribute__ ((noipa))
 track (int n)
 {
   char stackpos[1];
diff --git a/gcc/testsuite/gcc.dg/sibcall-10.c b/gcc/testsuite/gcc.dg/sibcall-10.c
index 4ac2ee45fbf..dcb3e6a5ba2 100644
--- a/gcc/testsuite/gcc.dg/sibcall-10.c
+++ b/gcc/testsuite/gcc.dg/sibcall-10.c
@@ -46,7 +46,7 @@ int main ()
    reasonably sure is to make them have the same contents (regarding the
    n tests).  */
 
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
 recurser_void1 (void)
 {
   if (n == 0 || n == 7 || n == 8)
@@ -58,7 +58,7 @@ recurser_void1 (void)
   recurser_void2 ();
 }
 
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
 recurser_void2 (void)
 {
   if (n == 0 || n == 7 || n == 8)
@@ -73,7 +73,7 @@ recurser_void2 (void)
 
 void *trackpoint;
 
-void __attribute__ ((noinline))
+void __attribute__ ((noipa))
 track ()
 {
   char stackpos[1];
diff --git a/gcc/testsuite/gcc.dg/sibcall-2.c b/gcc/testsuite/gcc.dg/sibcall-2.c
index a626273e620..0d4df82b0ca 100644
--- a/gcc/testsuite/gcc.dg/sibcall-2.c
+++ b/gcc/testsuite/gcc.dg/sibcall-2.c
@@ -38,7 +38,7 @@ recurser_void (void)
 
 void *trackpoint;
 
-void __attribute__ ((noinline))
+void __attribute__ ((noipa))
 track ()
 {
   char stackpos[1];
diff --git a/gcc/testsuite/gcc.dg/sibcall-3.c b/gcc/testsuite/gcc.dg/sibcall-3.c
index 9962b641298..80555cf0640 100644
--- a/gcc/testsuite/gcc.dg/sibcall-3.c
+++ b/gcc/testsuite/gcc.dg/sibcall-3.c
@@ -40,7 +40,7 @@ int main ()
    reasonably sure is to make them have the same contents (regarding the
    n tests).  */
 
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
 recurser_void1 (int n)
 {
   if (n == 0 || n == 7 || n == 8)
@@ -52,7 +52,7 @@ recurser_void1 (int n)
   recurser_void2 (n + 1);
 }
 
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
 recurser_void2 (int n)
 {
   if (n == 0 || n == 7 || n == 8)
@@ -66,7 +66,7 @@ recurser_void2 (int n)
 
 void *trackpoint;
 
-void __attribute__ ((noinline))
+void __attribute__ ((noipa))
 track (int n)
 {
   char stackpos[1];
diff --git a/gcc/testsuite/gcc.dg/sibcall-4.c b/gcc/testsuite/gcc.dg/sibcall-4.c
index 9ba1d16d489..97086bb5106 100644
--- a/gcc/testsuite/gcc.dg/sibcall-4.c
+++ b/gcc/testsuite/gcc.dg/sibcall-4.c
@@ -41,7 +41,7 @@ int main ()
    reasonably sure is to make them have the same contents (regarding the
    n tests).  */
 
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
 recurser_void1 (void)
 {
   if (n == 0 || n == 7 || n == 8)
@@ -53,7 +53,7 @@ recurser_void1 (void)
   recurser_void2 ();
 }
 
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
 recurser_void2 (void)
 {
   if (n == 0 || n == 7 || n == 8)
@@ -67,7 +67,7 @@ recurser_void2 (void)
 
 void *trackpoint;
 
-void __attribute__ ((noinline))
+void __attribute__ ((noipa))
 track ()
 {
   char stackpos[1];
diff --git a/gcc/testsuite/gcc.dg/sibcall-9.c b/gcc/testsuite/gcc.dg/sibcall-9.c
index c06acdbea35..006dc0d28f8 100644
--- a/gcc/testsuite/gcc.dg/sibcall-9.c
+++ b/gcc/testsuite/gcc.dg/sibcall-9.c
@@ -45,7 +45,7 @@ int main ()
    reasonably sure is to make them have the same contents (regarding the
    n tests).  */
 
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
 recurser_void1 (int n)
 {
   if (n == 0 || n == 7 || n == 8)
@@ -57,7 +57,7 @@ recurser_void1 (int n)
   recurser_void2 (n + 1);
 }
 
-static void __attribute__((noinline)) ATTR
+static void __attribute__((noipa)) ATTR
 recurser_void2 (int n)
 {
   if (n == 0 || n == 7 || n == 8)
@@ -72,7 +72,7 @@ recurser_void2 (int n)
 
 void *trackpoint;
 
-void __attribute__ ((noinline))
+void __attribute__ ((noipa))
 track (int n)
 {
   char stackpos[1];


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-08 17:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 17:51 [gcc r12-5839] testsuite: Use attribute "noipa" in sibcall tests Hans-Peter Nilsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).