]> gcc.gnu.org Git - gcc.git/commitdiff
riscv: xtheadcondmov: Don't run tests with -Oz
authorChristoph Müllner <christoph.muellner@vrull.eu>
Fri, 1 Sep 2023 09:56:20 +0000 (11:56 +0200)
committerPhilipp Tomsich <philipp.tomsich@vrull.eu>
Tue, 5 Sep 2023 08:48:30 +0000 (10:48 +0200)
Recently, these xtheadcondmov tests regressed with -Oz:
* FAIL: gcc.target/riscv/xtheadcondmov-mveqz-imm-eqz.c
* FAIL: gcc.target/riscv/xtheadcondmov-mveqz-imm-not.c
* FAIL: gcc.target/riscv/xtheadcondmov-mvnez-imm-cond.c
* FAIL: gcc.target/riscv/xtheadcondmov-mvnez-imm-nez.c

As -Oz stands for "Optimize aggressively for size rather than speed.",
we need to inspect the generated code, which looks like this:

  -Oz
  0000000000000000 <not_int_int>:
     0:   e199                    bnez    a1,6 <.L2>
     2:   40100513                li      a0,1025
  0000000000000006 <.L2>:
     6:   8082                    ret

  -O2:
  0000000000000000 <not_int_int>:
     0:   40100793                li      a5,1025
     4:   40b7950b                th.mveqz        a0,a5,a1
     8:   8082                    ret

As the generated code with -Oz consumes less size, there is nothing
wrong in the code generation. Instead, let's not run the xtheadcondmov
tests with -Oz.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/xtheadcondmov-mveqz-imm-eqz.c: Disable for -Oz.
* gcc.target/riscv/xtheadcondmov-mveqz-imm-not.c: Likewise.
* gcc.target/riscv/xtheadcondmov-mveqz-reg-eqz.c: Likewise.
* gcc.target/riscv/xtheadcondmov-mveqz-reg-not.c: Likewise.
* gcc.target/riscv/xtheadcondmov-mvnez-imm-cond.c: Likewise.
* gcc.target/riscv/xtheadcondmov-mvnez-imm-nez.c: Likewise.
* gcc.target/riscv/xtheadcondmov-mvnez-reg-cond.c: Likewise.
* gcc.target/riscv/xtheadcondmov-mvnez-reg-nez.c: Likewise.

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-imm-eqz.c
gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-imm-not.c
gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-reg-eqz.c
gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-reg-not.c
gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-imm-cond.c
gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-imm-nez.c
gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-reg-cond.c
gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-reg-nez.c

index 913ae43f21b525d03dc540aeabfa88bac8a868f3..9cc9ec1d0c78d37c1cb9a00b56b7ba189da0f577 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-march=rv32gc_xtheadcondmov" { target { rv32 } } } */
 /* { dg-options "-march=rv64gc_xtheadcondmov" { target { rv64 } } } */
-/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" } } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" "-Oz" } } */
 
 int
 not_int_int (int x, int cond)
index 1bc8b83823359231c21e322e2f935703ad838db1..491343370b77b21bd0168e3459c38159cb222345 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-march=rv32gc_xtheadcondmov" { target { rv32 } } } */
 /* { dg-options "-march=rv64gc_xtheadcondmov" { target { rv64 } } } */
-/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" } } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" "-Oz" } } */
 
 int
 not_int_int (int x, int cond)
index 8ef5869a89b687720a3771469c35aac03d037640..d7227249e84c321655ff2401b908b029ead92615 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-march=rv32gc_xtheadcondmov" { target { rv32 } } } */
 /* { dg-options "-march=rv64gc_xtheadcondmov" { target { rv64 } } } */
-/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" } } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" "-Oz" } } */
 
 int
 not_int_int (int x, int cond, int v)
index f9568bee27fc5286bf3fa6834a6a89fb61db8232..6cc98e36e71fb4d0034c298126fb75cc34da88d4 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-march=rv32gc_xtheadcondmov" { target { rv32 } } } */
 /* { dg-options "-march=rv64gc_xtheadcondmov" { target { rv64 } } } */
-/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" } } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" "-Oz" } } */
 
 int
 not_int_int (int x, int cond, int v)
index 8feddbeb79d906a00570be40c87cca57342ccf77..7cce2c71d18a05ad2a5fa9fd0f4ae4302af0d11c 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-march=rv32gc_xtheadcondmov" { target { rv32 } } } */
 /* { dg-options "-march=rv64gc_xtheadcondmov" { target { rv64 } } } */
-/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" } } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" "-Oz" } } */
 
 int
 not_int_int (int x, int cond)
index 7c08e20c25dbcd703efb61e278ae170d96578e6f..51b90bbc9a9ecfe8d6d831b607c1f5b8d78606ae 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-march=rv32gc_xtheadcondmov" { target { rv32 } } } */
 /* { dg-options "-march=rv64gc_xtheadcondmov" { target { rv64 } } } */
-/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" } } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" "-Oz" } } */
 
 int
 not_int_int (int x, int cond)
index c1619509af93c64d826ee9ddeba6a3b96890589f..d9bde61cd2b0b682ae880ca62c25a023489c4319 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-march=rv32gc_xtheadcondmov" { target { rv32 } } } */
 /* { dg-options "-march=rv64gc_xtheadcondmov" { target { rv64 } } } */
-/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" } } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" "-Oz" } } */
 
 int
 not_int_int (int x, int cond, int v)
index ff95a57927a665c8ea181e3d9379a5292576729e..c12501a752c0ba99159eb87d7f13a304ff7e23a1 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-march=rv32gc_xtheadcondmov" { target { rv32 } } } */
 /* { dg-options "-march=rv64gc_xtheadcondmov" { target { rv64 } } } */
-/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" } } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" "-Oz" } } */
 
 int
 not_int_int (int x, int cond, int v)
This page took 0.076527 seconds and 5 git commands to generate.