testsuite: Use attribute "noipa" in sibcall tests
authorHans-Peter Nilsson <hp@axis.com>
Tue, 7 Dec 2021 05:18:57 +0000 (06:18 +0100)
committerHans-Peter Nilsson <hp@axis.com>
Wed, 8 Dec 2021 17:50:54 +0000 (18:50 +0100)
commit60147c2b7d987f6142bdc1d2ae83e091fc6a5a45
treeeec90d69131e3d769d49ad40d599d51ce7eeaa8a
parent6c0399378e77d02962e5d49f7b72d6fa8ebe5e07
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".
gcc/testsuite/gcc.dg/sibcall-1.c
gcc/testsuite/gcc.dg/sibcall-10.c
gcc/testsuite/gcc.dg/sibcall-2.c
gcc/testsuite/gcc.dg/sibcall-3.c
gcc/testsuite/gcc.dg/sibcall-4.c
gcc/testsuite/gcc.dg/sibcall-9.c