It can't work. Still failed: spawn -ignore SIGHUP /work/home/jzzhong/work/toolchain/riscv/build/dev-rv64gcv_zfh-lp64d-medany-newlib-spike-debug/build-gcc-newlib-stage2/gcc/xgcc -B/work/home/jzzhong/work/toolchain/riscv/build/dev-rv64gcv_zfh-lp64d-medany-newlib-spike-debug/build-gcc-newlib-stage2/gcc/ riscv_ext_v3079949.c -march=rv64gcv_zfh -mabi=lp64d -mcmodel=medany -fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o riscv_ext_v3079949.s^M PASS: gcc.dg/vect/vect-cond-arith-6.c scan-tree-dump-times vect "vectorizing stmts using SLP" 4 gcc.dg/vect/vect-cond-arith-6.c: pattern found 2 times FAIL: gcc.dg/vect/vect-cond-arith-6.c scan-tree-dump-times optimized " = \\.COND(_LEN)?_ADD" 1 gcc.dg/vect/vect-cond-arith-6.c: pattern found 2 times FAIL: gcc.dg/vect/vect-cond-arith-6.c scan-tree-dump-times optimized " = \\.COND(_LEN)?_SUB" 1 gcc.dg/vect/vect-cond-arith-6.c: pattern found 2 times FAIL: gcc.dg/vect/vect-cond-arith-6.c scan-tree-dump-times optimized " = \\.COND(_LEN)?_MUL" 1 gcc.dg/vect/vect-cond-arith-6.c: pattern found 2 times FAIL: gcc.dg/vect/vect-cond-arith-6.c scan-tree-dump-times optimized " = \\.COND(_LEN)?_RDIV" 1
I change it into: /* { dg-final { scan-tree-dump-times { = \.COND_LEN_ADD} 1 "optimized" { target vect_double_cond_arith } } } */ /* { dg-final { scan-tree-dump-times { = \.COND_LEN_SUB} 1 "optimized" { target vect_double_cond_arith } } } */ /* { dg-final { scan-tree-dump-times { = \.COND_LEN_MUL} 1 "optimized" { target vect_double_cond_arith } } } */ /* { dg-final { scan-tree-dump-times { = \.COND_LEN_RDIV} 1 "optimized" { target vect_double_cond_arith } } } */ It work. This also can work: /* { dg-final { scan-tree-dump-times { = \.COND_L?E?N?_?ADD} 1 "optimized" { target vect_double_cond_arith } } } */ /* { dg-final { scan-tree-dump-times { = \.COND_L?E?N?_?SUB} 1 "optimized" { target vect_double_cond_arith } } } */ /* { dg-final { scan-tree-dump-times { = \.COND_L?E?N?_?MUL} 1 "optimized" { target vect_double_cond_arith } } } */ /* { dg-final { scan-tree-dump-times { = \.COND_L?E?N?_?RDIV} 1 "optimized" { target vect_double_cond_arith } } } */ juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-10-08 23:18 To: 钟居哲; gcc-patches CC: rguenther; rdapp.gcc Subject: Re: [PATCH] TEST: Fix vect_cond_arith_* dump checks for RVV On 10/7/23 16:02, 钟居哲 wrote: > Do you mean change it like this ? > > /* { dg-final { scan-tree-dump-times { = \.COND_L?E?N?_?RDIV} 1 "optimized" { > target vect_double_cond_arith } } } */ I was thinking something more like COND(_LEN)?_ADD The idea being we match _LEN conditionally as a group. jeff