From: MITSUNARI Shigeo Date: Mon, 13 Jul 2026 20:33:58 +0000 (-0600) Subject: i386: Add -mtune=generic to highpart multiplication tests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1f11b54d85f9e4537aaed99166aeba0cecb4b35;p=thirdparty%2Fgcc.git 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 --git a/gcc/testsuite/gcc.target/i386/bmi2-mulx-highpart-1.c b/gcc/testsuite/gcc.target/i386/bmi2-mulx-highpart-1.c index 8b3b6725d1b..ccb9875f828 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 56728cd5b7c..fff0eac239a 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