From: Jeff Law Date: Thu, 6 Mar 2025 05:24:05 +0000 (-0700) Subject: Improve coverage of ext-dce tests in risc-v testsuite X-Git-Tag: basepoints/gcc-16~1706 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=316eaca17ee11f575fc72e139e8cc3f9f5ccb067;p=thirdparty%2Fgcc.git Improve coverage of ext-dce tests in risc-v testsuite 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. --- diff --git a/gcc/testsuite/gcc.target/riscv/core_list_init.c b/gcc/testsuite/gcc.target/riscv/core_list_init.c index 2f36dae85aa..eec3a817d80 100644 --- a/gcc/testsuite/gcc.target/riscv/core_list_init.c +++ b/gcc/testsuite/gcc.target/riscv/core_list_init.c @@ -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) { diff --git a/gcc/testsuite/gcc.target/riscv/pr111384.c b/gcc/testsuite/gcc.target/riscv/pr111384.c index a4e77d4aeb6..0000bcf33eb 100644 --- a/gcc/testsuite/gcc.target/riscv/pr111384.c +++ b/gcc/testsuite/gcc.target/riscv/pr111384.c @@ -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)