]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386: Add -mtune=generic to highpart multiplication tests
authorMITSUNARI Shigeo <herumi@nifty.com>
Mon, 13 Jul 2026 20:33:58 +0000 (14:33 -0600)
committerJeff Law <jeffrey.law@oss.qualcomm.com>
Mon, 13 Jul 2026 20:34:43 +0000 (14:34 -0600)
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.

gcc/testsuite/gcc.target/i386/bmi2-mulx-highpart-1.c
gcc/testsuite/gcc.target/i386/mulq-highpart.c

index 8b3b6725d1b2c33852b3b3690da34b59673d7b20..ccb9875f828200161043d4c2e12c040e38edd906 100644 (file)
@@ -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
index 56728cd5b7c9965895c956c7c572ded145b1c0cd..fff0eac239ac8b4a250b31d4fb3293d4c37f834f 100644 (file)
@@ -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