[PATCH] zero-scratch-regs-[29|30].c: Disable TARGET_USE_FFREEP

"H.J. Lu" <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <CAMe9rOo_ax0F9sicULzpkRL0zr-8+-M8FONwkncR6G4Z4_f00A@mail.gmail.com>
Compile zero-scratch-regs-[29|30].c with -mtune-ctrl=^use_ffreep to
disable using freep instruction instead of fstp to avoid:

FAIL: gcc.target/i386/zero-scratch-regs-29.c scan-assembler-times fstp[ \t]+%st\
\(0\\) 7
FAIL: gcc.target/i386/zero-scratch-regs-29.c scan-assembler-times fstp[ \t]+%st\
\(0\\) 7
FAIL: gcc.target/i386/zero-scratch-regs-30.c scan-assembler-times fstp[ \t]+%st\
\(0\\) 6
FAIL: gcc.target/i386/zero-scratch-regs-30.c scan-assembler-times fstp[ \t]+%st\
\(0\\) 8

when TARGET_USE_FFREEP is enabled by default.

PR testsuite/126923
* gcc.target/i386/zero-scratch-regs-29.c (dg-options): Add
-mtune-ctrl=^use_ffreep.
* gcc.target/i386/zero-scratch-regs-30.c (dg-options): Likewise.

-- 
H.J.
0001-zero-scratch-regs-29-30-.c-Disable-TARGET_USE_FFREEP.patch (text/x-patch, 2.1 KB)
From 2bff11745fb8b8e3761051f304419b079f012fa2 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <[email protected]>
Date: Wed, 19 Aug 2026 05:55:27 +0800
Subject: [PATCH] zero-scratch-regs-[29|30].c: Disable TARGET_USE_FFREEP

Compile zero-scratch-regs-[29|30].c with -mtune-ctrl=^use_ffreep to
disable using freep instruction instead of fstp to avoid:

FAIL: gcc.target/i386/zero-scratch-regs-29.c scan-assembler-times fstp[ \t]+%st\
\(0\\) 7
FAIL: gcc.target/i386/zero-scratch-regs-29.c scan-assembler-times fstp[ \t]+%st\
\(0\\) 7
FAIL: gcc.target/i386/zero-scratch-regs-30.c scan-assembler-times fstp[ \t]+%st\
\(0\\) 6
FAIL: gcc.target/i386/zero-scratch-regs-30.c scan-assembler-times fstp[ \t]+%st\
\(0\\) 8

when TARGET_USE_FFREEP is enabled by default.

	PR testsuite/126923
	* gcc.target/i386/zero-scratch-regs-29.c (dg-options): Add
	-mtune-ctrl=^use_ffreep.
	* gcc.target/i386/zero-scratch-regs-30.c (dg-options): Likewise.

Signed-off-by: H.J. Lu <[email protected]>
---
 gcc/testsuite/gcc.target/i386/zero-scratch-regs-29.c | 2 +-
 gcc/testsuite/gcc.target/i386/zero-scratch-regs-30.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.target/i386/zero-scratch-regs-29.c b/gcc/testsuite/gcc.target/i386/zero-scratch-regs-29.c
index 62706454f6c..636753e2120 100644
--- a/gcc/testsuite/gcc.target/i386/zero-scratch-regs-29.c
+++ b/gcc/testsuite/gcc.target/i386/zero-scratch-regs-29.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target *-*-linux* } } */
-/* { dg-options "-O2 -fzero-call-used-regs=all" } */
+/* { dg-options "-O2 -fzero-call-used-regs=all -mtune-ctrl=^use_ffreep" } */
 
 long double ret_x87 (void)
 {
diff --git a/gcc/testsuite/gcc.target/i386/zero-scratch-regs-30.c b/gcc/testsuite/gcc.target/i386/zero-scratch-regs-30.c
index c4e99303d22..e67baafa643 100644
--- a/gcc/testsuite/gcc.target/i386/zero-scratch-regs-30.c
+++ b/gcc/testsuite/gcc.target/i386/zero-scratch-regs-30.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target *-*-linux* } } */
-/* { dg-options "-O2 -fzero-call-used-regs=all" } */
+/* { dg-options "-O2 -fzero-call-used-regs=all -mtune-ctrl=^use_ffreep" } */
 
 _Complex long double ret_x87_cplx (void)
 {
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.