]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Adjust mips test for recent ifcvt costing changes
authorJeff Law <jlaw@ventanamicro>
Sat, 29 Apr 2023 16:16:21 +0000 (10:16 -0600)
committerJeff Law <jlaw@ventanamicro>
Sat, 29 Apr 2023 16:16:21 +0000 (10:16 -0600)
MIPS ports have been failing a few tests since the change to add cost
checks in another path through the if-converter pass.

As with the other ports, these look like cases where we don't do good
costing in the MIPS port.  Someone who cares about MIPS will need to
fix this properly.

In the mean time this patch adjusts the branch cost when running the
two affected tests and skips them at -Os.  This is enough to verify
that if conversion can still happen if the costs are adjusted.

gcc/testsuite
* gcc.target/mips/mips-ps-type-2.c: Adjust branch cost to
encourage if-conversion.  Skip for -Os.
* gcc.target/mips/movcc-3.c: Similarly.

gcc/testsuite/gcc.target/mips/mips-ps-type-2.c
gcc/testsuite/gcc.target/mips/movcc-3.c

index ed5d6ee166371f49d206a7708c2a4664fdeb00ca..e5cb7d48dae28c179f884dc569dc35df3ea86863 100644 (file)
@@ -1,8 +1,8 @@
 /* Test v2sf calculations.  The nmadd and nmsub patterns need
    -ffinite-math-only.  */
 /* { dg-do compile } */
-/* { dg-options "(HAS_MADDPS) -mmadd4 -mgp32 -mpaired-single -ffinite-math-only forbid_cpu=octeon.*" } */
-/* { dg-skip-if "nmadd and nmsub need combine" { *-*-* } { "-O0" } { "" } } */
+/* { dg-options "(HAS_MADDPS) -mmadd4 -mgp32 -mpaired-single -ffinite-math-only forbid_cpu=octeon.* -mbranch-cost=2" } */
+/* { dg-skip-if "nmadd and nmsub need combine" { *-*-* } { "-O0" "-Os" } { "" } } */
 /* { dg-final { scan-assembler "\tcvt.ps.s\t" } } */
 /* { dg-final { scan-assembler "\tmov.ps\t" } } */
 /* { dg-final { scan-assembler "\tldc1\t" } } */
index 55434b72c72b585975da5d06c7ea8b234dca6b24..80d44098a3f528f79d365ef19882942ddaa9edbe 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "(HAS_MOVN) -mhard-float" } */
-/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-options "(HAS_MOVN) -mhard-float -mbranch-cost=2" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" "-Os" } { "" } } */
 /* { dg-final { scan-assembler "\tmovt\t" } } */
 /* { dg-final { scan-assembler "\tmovf\t" } } */
 /* { dg-final { scan-assembler "\tmovz.s\t" } } */