diff mbox series

[testsuite,i386] work around fails with --enable-frame-pointer

Message ID orjzkyc6d9.fsf@lxoliva.fsfla.org
State New
Headers show
Series [testsuite,i386] work around fails with --enable-frame-pointer | expand

Commit Message

Alexandre Oliva April 16, 2024, 3:51 a.m. UTC
A few x86 tests get unexpected insn counts if the toolchain is
configured with --enable-frame-pointer.  Add explicit
-fomit-frame-pointer so that the expected insn sequences are output.

Regstrapped on x86_64-linux-gnu.  Also tested with gcc-13 on arm-,
aarch64-, x86- and x86_64-vxworks7r2.  Ok to install?


for  gcc/testsuite/ChangeLog

	* gcc.target/i386/pr107261.c: Add -fomit-frame-pointer.
	* gcc.target/i386/pr69482-1.c: Likewise.
	* gcc.target/i386/pr69482-2.c: Likewise.
---
 gcc/testsuite/gcc.target/i386/pr107261.c  |    2 +-
 gcc/testsuite/gcc.target/i386/pr69482-1.c |    2 +-
 gcc/testsuite/gcc.target/i386/pr69482-2.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Uros Bizjak April 17, 2024, 6:24 p.m. UTC | #1
On Tue, Apr 16, 2024 at 5:51 AM Alexandre Oliva <oliva@adacore.com> wrote:
>
>
> A few x86 tests get unexpected insn counts if the toolchain is
> configured with --enable-frame-pointer.  Add explicit
> -fomit-frame-pointer so that the expected insn sequences are output.
>
> Regstrapped on x86_64-linux-gnu.  Also tested with gcc-13 on arm-,
> aarch64-, x86- and x86_64-vxworks7r2.  Ok to install?
>
>
> for  gcc/testsuite/ChangeLog
>
>         * gcc.target/i386/pr107261.c: Add -fomit-frame-pointer.
>         * gcc.target/i386/pr69482-1.c: Likewise.
>         * gcc.target/i386/pr69482-2.c: Likewise.

OK.

Thanks,
Uros.

> ---
>  gcc/testsuite/gcc.target/i386/pr107261.c  |    2 +-
>  gcc/testsuite/gcc.target/i386/pr69482-1.c |    2 +-
>  gcc/testsuite/gcc.target/i386/pr69482-2.c |    2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/i386/pr107261.c b/gcc/testsuite/gcc.target/i386/pr107261.c
> index eb1d232fbfc4b..b422af9cbf9a2 100644
> --- a/gcc/testsuite/gcc.target/i386/pr107261.c
> +++ b/gcc/testsuite/gcc.target/i386/pr107261.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2 -msse2" } */
> +/* { dg-options "-O2 -msse2 -fomit-frame-pointer" } */
>
>  typedef __bf16 v4bf __attribute__ ((vector_size (8)));
>  typedef __bf16 v2bf __attribute__ ((vector_size (4)));
> diff --git a/gcc/testsuite/gcc.target/i386/pr69482-1.c b/gcc/testsuite/gcc.target/i386/pr69482-1.c
> index 99bb6ad5a377b..7ef0e71b17c8e 100644
> --- a/gcc/testsuite/gcc.target/i386/pr69482-1.c
> +++ b/gcc/testsuite/gcc.target/i386/pr69482-1.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O3 -fno-stack-protector" } */
> +/* { dg-options "-O3 -fno-stack-protector -fomit-frame-pointer" } */
>
>  static inline void memset_s(void* s, int n) {
>    volatile unsigned char * p = s;
> diff --git a/gcc/testsuite/gcc.target/i386/pr69482-2.c b/gcc/testsuite/gcc.target/i386/pr69482-2.c
> index 58e89a7933364..6aabe4fb39399 100644
> --- a/gcc/testsuite/gcc.target/i386/pr69482-2.c
> +++ b/gcc/testsuite/gcc.target/i386/pr69482-2.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2" } */
> +/* { dg-options "-O2 -fomit-frame-pointer" } */
>
>  void bar ()
>  {
>
> --
> Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
>    Free Software Activist                   GNU Toolchain Engineer
> More tolerance and less prejudice are key for inclusion and diversity
> Excluding neuro-others for not behaving ""normal"" is *not* inclusive
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/i386/pr107261.c b/gcc/testsuite/gcc.target/i386/pr107261.c
index eb1d232fbfc4b..b422af9cbf9a2 100644
--- a/gcc/testsuite/gcc.target/i386/pr107261.c
+++ b/gcc/testsuite/gcc.target/i386/pr107261.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -msse2" } */
+/* { dg-options "-O2 -msse2 -fomit-frame-pointer" } */
 
 typedef __bf16 v4bf __attribute__ ((vector_size (8)));
 typedef __bf16 v2bf __attribute__ ((vector_size (4)));
diff --git a/gcc/testsuite/gcc.target/i386/pr69482-1.c b/gcc/testsuite/gcc.target/i386/pr69482-1.c
index 99bb6ad5a377b..7ef0e71b17c8e 100644
--- a/gcc/testsuite/gcc.target/i386/pr69482-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr69482-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O3 -fno-stack-protector" } */
+/* { dg-options "-O3 -fno-stack-protector -fomit-frame-pointer" } */
 
 static inline void memset_s(void* s, int n) {
   volatile unsigned char * p = s;
diff --git a/gcc/testsuite/gcc.target/i386/pr69482-2.c b/gcc/testsuite/gcc.target/i386/pr69482-2.c
index 58e89a7933364..6aabe4fb39399 100644
--- a/gcc/testsuite/gcc.target/i386/pr69482-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr69482-2.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fomit-frame-pointer" } */
 
 void bar ()
 {