[COMMITTED, PATCH] x86: Compile PR 125436 tests with -mno-avx

"H.J. Lu" <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <CAMe9rOo0pFsDhnTshPEiMTjQqJ3LL2Bj44EGfwTS0p7JTopaYA@mail.gmail.com>
Compile PR 125436 tests with -mno-avx to avoid

FAIL: gcc.target/i386/pr125436-1a.c check-function-bodies ms_tls_access
FAIL: gcc.target/i386/pr125436-1b.c check-function-bodies ms_tls_access
FAIL: gcc.target/i386/pr125436-2a.c check-function-bodies ms_tls_access
FAIL: gcc.target/i386/pr125436-2b.c check-function-bodies ms_tls_access
FAIL: gcc.target/i386/pr125436-3.c check-function-bodies ms_tls_access
FAIL: gcc.target/i386/pr125436-4.c check-function-bodies ms_tls_access

due to the generated instruction

vmovaps (%rsp), %xmm6

vs the expected instruction

movaps (%rsp), %xmm6

when AVX is enabled by default.

PR testsuite/126923
* gcc.target/i386/pr125436-1a.c (dg-options): Add -mno-avx.
* gcc.target/i386/pr125436-1b.c (dg-options): Likewise.
* gcc.target/i386/pr125436-2a.c (dg-options): Likewise.
* gcc.target/i386/pr125436-2b.c (dg-options): Likewise.
* gcc.target/i386/pr125436-3.c (dg-options): Likewise.
* gcc.target/i386/pr125436-4.c (dg-options): Likewise.

-- 
H.J.
0001-x86-Compile-PR-125436-tests-with-mno-avx.patch (text/x-patch, 6.3 KB)
From babfc26a9d03a39b3f24190521d5b05fdc2be4d4 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <[email protected]>
Date: Thu, 20 Aug 2026 07:39:30 +0800
Subject: [PATCH] x86: Compile PR 125436 tests with -mno-avx

Compile PR 125436 tests with -mno-avx to avoid

FAIL: gcc.target/i386/pr125436-1a.c check-function-bodies ms_tls_access
FAIL: gcc.target/i386/pr125436-1b.c check-function-bodies ms_tls_access
FAIL: gcc.target/i386/pr125436-2a.c check-function-bodies ms_tls_access
FAIL: gcc.target/i386/pr125436-2b.c check-function-bodies ms_tls_access
FAIL: gcc.target/i386/pr125436-3.c check-function-bodies ms_tls_access
FAIL: gcc.target/i386/pr125436-4.c check-function-bodies ms_tls_access

due to the generated instruction

	vmovaps (%rsp), %xmm6

vs the expected instruction

	movaps (%rsp), %xmm6

when AVX is enabled by default.

	PR testsuite/126923
	* gcc.target/i386/pr125436-1a.c (dg-options): Add -mno-avx.
	* gcc.target/i386/pr125436-1b.c (dg-options): Likewise.
	* gcc.target/i386/pr125436-2a.c (dg-options): Likewise.
	* gcc.target/i386/pr125436-2b.c (dg-options): Likewise.
	* gcc.target/i386/pr125436-3.c (dg-options): Likewise.
	* gcc.target/i386/pr125436-4.c (dg-options): Likewise.

Signed-off-by: H.J. Lu <[email protected]>
---
 gcc/testsuite/gcc.target/i386/pr125436-1a.c | 2 +-
 gcc/testsuite/gcc.target/i386/pr125436-1b.c | 2 +-
 gcc/testsuite/gcc.target/i386/pr125436-2a.c | 2 +-
 gcc/testsuite/gcc.target/i386/pr125436-2b.c | 2 +-
 gcc/testsuite/gcc.target/i386/pr125436-3.c  | 2 +-
 gcc/testsuite/gcc.target/i386/pr125436-4.c  | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/testsuite/gcc.target/i386/pr125436-1a.c b/gcc/testsuite/gcc.target/i386/pr125436-1a.c
index be3c2509fc6..81bdec0832b 100644
--- a/gcc/testsuite/gcc.target/i386/pr125436-1a.c
+++ b/gcc/testsuite/gcc.target/i386/pr125436-1a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { *-*-linux* && lp64 } } } */
-/* { dg-options "-O1 -fPIC -mtls-dialect=gnu -mtune-ctrl=^prologue_using_move,^epilogue_using_move -mno-push-args -fomit-frame-pointer -mtune=generic" } */
+/* { dg-options "-O1 -fPIC -mtls-dialect=gnu -mtune-ctrl=^prologue_using_move,^epilogue_using_move -mno-avx -mno-push-args -fomit-frame-pointer -mtune=generic" } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.}  } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr125436-1b.c b/gcc/testsuite/gcc.target/i386/pr125436-1b.c
index 9b6e4a508c9..24a7621890a 100644
--- a/gcc/testsuite/gcc.target/i386/pr125436-1b.c
+++ b/gcc/testsuite/gcc.target/i386/pr125436-1b.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { *-*-linux* && lp64 } } } */
-/* { dg-options "-O1 -fPIC -mabi=ms -mtls-dialect=gnu -mtune-ctrl=^prologue_using_move,^epilogue_using_move -mno-push-args -fomit-frame-pointer -mtune=generic" } */
+/* { dg-options "-O1 -fPIC -mabi=ms -mtls-dialect=gnu -mtune-ctrl=^prologue_using_move,^epilogue_using_move -mno-avx -mno-push-args -fomit-frame-pointer -mtune=generic" } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.}  } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr125436-2a.c b/gcc/testsuite/gcc.target/i386/pr125436-2a.c
index 9126d3ca2ab..9df121efd3d 100644
--- a/gcc/testsuite/gcc.target/i386/pr125436-2a.c
+++ b/gcc/testsuite/gcc.target/i386/pr125436-2a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { *-*-linux* && lp64 } } } */
-/* { dg-options "-O1 -fPIC -mtls-dialect=gnu -mtune-ctrl=^prologue_using_move,^epilogue_using_move -mno-push-args -fomit-frame-pointer -mtune=generic" } */
+/* { dg-options "-O1 -fPIC -mtls-dialect=gnu -mtune-ctrl=^prologue_using_move,^epilogue_using_move -mno-avx -mno-push-args -fomit-frame-pointer -mtune=generic" } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.}  } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr125436-2b.c b/gcc/testsuite/gcc.target/i386/pr125436-2b.c
index 4c634c9d8b0..6f5b1c20f29 100644
--- a/gcc/testsuite/gcc.target/i386/pr125436-2b.c
+++ b/gcc/testsuite/gcc.target/i386/pr125436-2b.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { *-*-linux* && lp64 } } } */
-/* { dg-options "-O1 -fPIC -mabi=ms -mtls-dialect=gnu -mtune-ctrl=^prologue_using_move,^epilogue_using_move -mno-push-args -fomit-frame-pointer -mtune=generic" } */
+/* { dg-options "-O1 -fPIC -mabi=ms -mtls-dialect=gnu -mtune-ctrl=^prologue_using_move,^epilogue_using_move -mno-avx -mno-push-args -fomit-frame-pointer -mtune=generic" } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.}  } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr125436-3.c b/gcc/testsuite/gcc.target/i386/pr125436-3.c
index 939f85a586b..60b62122973 100644
--- a/gcc/testsuite/gcc.target/i386/pr125436-3.c
+++ b/gcc/testsuite/gcc.target/i386/pr125436-3.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { *-*-linux* && lp64 } } } */
-/* { dg-options "-O1 -fPIC -mtls-dialect=gnu -mtune-ctrl=^prologue_using_move,^epilogue_using_move -mno-push-args -fomit-frame-pointer -mtune=generic" } */
+/* { dg-options "-O1 -fPIC -mtls-dialect=gnu -mtune-ctrl=^prologue_using_move,^epilogue_using_move -mno-avx -mno-push-args -fomit-frame-pointer -mtune=generic" } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.}  } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr125436-4.c b/gcc/testsuite/gcc.target/i386/pr125436-4.c
index 205595810aa..ffa16ecb480 100644
--- a/gcc/testsuite/gcc.target/i386/pr125436-4.c
+++ b/gcc/testsuite/gcc.target/i386/pr125436-4.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { *-*-linux* && lp64 } } } */
-/* { dg-options "-O1 -fPIC -mabi=ms -mtls-dialect=gnu -mtune-ctrl=^prologue_using_move,^epilogue_using_move -mno-push-args -fomit-frame-pointer -mtune=generic" } */
+/* { dg-options "-O1 -fPIC -mabi=ms -mtls-dialect=gnu -mtune-ctrl=^prologue_using_move,^epilogue_using_move -mno-avx -mno-push-args -fomit-frame-pointer -mtune=generic" } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.}  } } */
 
-- 
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.