]> git.ipfire.org Git - thirdparty/gcc.git/commit
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)
commit8451fbd56871267e8c1cd781db6d8f02e826f66c
treee1209ec7cf7eec8fe798018be0ecffc0ab2dc559
parent1cf57a14d7de4d150a59191973085a93050bcc9a
riscv: xtheadcondmov: Don't run tests with -Oz

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