[gcc r17-2368] i386: Add -mtune=generic to highpart multiplication tests

Jeff Law via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:b1f11b54d85f9e4537aaed99166aeba0cecb4b35

commit r17-2368-gb1f11b54d85f9e4537aaed99166aeba0cecb4b35
Author: MITSUNARI Shigeo <[email protected]>
Date:   Mon Jul 13 14:33:58 2026 -0600

    i386: Add -mtune=generic to highpart multiplication tests
    
    The check-function-bodies patterns in bmi2-mulx-highpart-1.c and
    mulq-highpart.c expect the instruction order produced with generic
    tuning.  With -march=cascadelake the scheduler swaps the movl and
    movabsq instructions, so pin -mtune=generic.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.target/i386/bmi2-mulx-highpart-1.c: Add -mtune=generic
            to dg-options.
            * gcc.target/i386/mulq-highpart.c: Likewise.

Diff:
---
 gcc/testsuite/gcc.target/i386/bmi2-mulx-highpart-1.c | 2 +-
 gcc/testsuite/gcc.target/i386/mulq-highpart.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.target/i386/bmi2-mulx-highpart-1.c b/gcc/testsuite/gcc.target/i386/bmi2-mulx-highpart-1.c
index 8b3b6725d1b2..ccb9875f8282 100644
--- a/gcc/testsuite/gcc.target/i386/bmi2-mulx-highpart-1.c
+++ b/gcc/testsuite/gcc.target/i386/bmi2-mulx-highpart-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mbmi2" } */
+/* { dg-options "-O2 -mbmi2 -mtune=generic" } */
 /* { dg-final { check-function-bodies "**" "" "" { target *-*-linux* *-*-gnu* } } } */
 
 /* %edx is fixed by the ISA (implicit mulx source) and %edi by the ABI
diff --git a/gcc/testsuite/gcc.target/i386/mulq-highpart.c b/gcc/testsuite/gcc.target/i386/mulq-highpart.c
index 56728cd5b7c9..fff0eac239ac 100644
--- a/gcc/testsuite/gcc.target/i386/mulq-highpart.c
+++ b/gcc/testsuite/gcc.target/i386/mulq-highpart.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mno-bmi2" } */
+/* { dg-options "-O2 -mno-bmi2 -mtune=generic" } */
 /* { dg-final { check-function-bodies "**" "" "" { target *-*-linux* *-*-gnu* } } } */
 
 /* %rax, %rdx and %edi are fixed by the ISA (mulq) and the ABI (first
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.