On Thu, Jan 11, 2024 at 3:37 PM Maciej W. Rozycki <ma...@embecosm.com> wrote: > > Verify that if-conversion succeeded through noce_try_store_flag_mask, as > per PR rtl-optimization/105314, tightening the test case and making it > explicit. > > gcc/testsuite/ > * gcc.target/riscv/pr105314.c: Scan the RTL "ce1" pass too.
I have an objection for this, if we are checking the RTL pass and not overall code generation, then maybe we change the testcase so that it is a RTL testcase instead. Especially when there might be improvements going into GCC 15 specifically targeting ifcvt on the gimple level (I am planning on doing some). Thanks, Andrew Pinski > --- > gcc/testsuite/gcc.target/riscv/pr105314.c | 2 ++ > 1 file changed, 2 insertions(+) > > gcc-test-riscv-pr105314-rtl.diff > Index: gcc/gcc/testsuite/gcc.target/riscv/pr105314.c > =================================================================== > --- gcc.orig/gcc/testsuite/gcc.target/riscv/pr105314.c > +++ gcc/gcc/testsuite/gcc.target/riscv/pr105314.c > @@ -1,6 +1,7 @@ > /* PR rtl-optimization/105314 */ > /* { dg-do compile } */ > /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-Os" "-Oz" } } */ > +/* { dg-options "-fdump-rtl-ce1" } */ > > long > foo (long a, long b, long c) > @@ -10,4 +11,5 @@ foo (long a, long b, long c) > return a; > } > > +/* { dg-final { scan-rtl-dump-times "if-conversion succeeded through > noce_try_store_flag_mask" 1 "ce1" } } */ > /* { dg-final { scan-assembler-not "\\s(?:beq|bne)\\s" } } */