]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Improve coverage of ext-dce tests in risc-v testsuite
authorJeff Law <jlaw@ventanamicro.com>
Thu, 6 Mar 2025 05:24:05 +0000 (22:24 -0700)
committerJeff Law <jlaw@ventanamicro.com>
Thu, 6 Mar 2025 05:28:33 +0000 (22:28 -0700)
Inspired by Liao Shihua, this adjusts two tests in the RISC-V testsuite
to get more coverage.  Drop the -O1 argument and replace it with -fext-dce.
That way the test gets run across the full set of flags.  We just need to
make sure to skip -O0.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/core_list_init.c: Use -fext-dce rather than
-O1.  Skip for -O0.
* gcc.target/riscv/pr111384.c: Ditto.

gcc/testsuite/gcc.target/riscv/core_list_init.c
gcc/testsuite/gcc.target/riscv/pr111384.c

index 2f36dae85aa7732878901744075a752b07e48413..eec3a817d80c6413c4440e96eca708665f7b1bba 100644 (file)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
-/* { dg-options "-O1 -fdump-rtl-ext_dce" } */
+/* { dg-options "-fext-dce -fdump-rtl-ext_dce" } */
 /* { dg-final { scan-rtl-dump {Successfully transformed} "ext_dce" } } */
+/* { dg-skip-if "" { *-*-* } { "-O0"} } */
 
 unsigned short
 core_list_init (int size, short seed) {
index a4e77d4aeb64d006faadf5ba88524893a052ff28..0000bcf33ebfcfdc1930ba4340a4f964034af3f1 100644 (file)
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
-/* { dg-options "-O1 -fdump-rtl-ext_dce" } */
+/* { dg-options "-fext-dce -fdump-rtl-ext_dce" } */
 /* { dg-final { scan-rtl-dump {Successfully transformed} "ext_dce" } } */
+/* { dg-skip-if "" { *-*-* } { "-O0"} } */
 
 void
 foo(unsigned int src, unsigned short *dst1, unsigned short *dst2)