On Mar 30, 2026, Alexandre Oliva <[email protected]> wrote:

> Failing that, should we make the test for beqctrl- unconditional and
> wait for reports to find out where that breaks?

Like this:


Unable to identify any ilp32 powerpc variant that would issue a
sibcall, even as far back as when safe-indirect-jump-8.c was
introduced, before it was folded into -1.c (which introduced the
malformed negated triplet), I propose we drop the checks for
alternative codegen patterns and check for what we've been getting,
and sometimes checking for, since the introduction of the testcase.

Regstrapped on x86_64-linux-gnu.  Also tested with ppc-elf and
ppc-vx7r2.  Ok to install?


for  gcc/testsuite/ChangeLog

        * gcc.target/powerpc/safe-indirect-jump-1.c: Drop checks for
        sibcall.
---
 .../gcc.target/powerpc/safe-indirect-jump-1.c      |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c 
b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c
index adecb3cd67233..dd65691a4fc14 100644
--- a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-1.c
@@ -14,9 +14,5 @@ int bar ()
 
 /* { dg-final { scan-assembler "crset 2" } } */
 
-/* The AIX and ELFv2 ABIs don't allow a sibcall here.  */
-/* { dg-final { scan-assembler "beqctrl-" { target { lp64 || { powerpc*-*-aix* 
} } } } } */
-
-/* The other ABIs do allow a sibcall.  */
-/* { dg-final { scan-assembler "beqctr-" { target { ilp32 && { ! 
powerpc*-*-aix* } } } } } */
-/* { dg-final { scan-assembler {b \$} { target { ilp32 && { ! powerpc*-*-aix* 
} } } } } */
+/* The AIX and ELFv2 ABIs don't allow a sibcall here.  ??? ELFv1 doesn't 
either.  */
+/* { dg-final { scan-assembler "beqctrl-" } } */


-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to