> The CI shows some scan failures in vls/avg-[456].c and > widen/vec-avg-rv32gcv.c.
Oops, I should run all test locally without additional failures before sent out, let me double check about it. > Also, the lint check complains about this line: Sure. Pan -----Original Message----- From: Robin Dapp <rdapp....@gmail.com> Sent: Friday, May 30, 2025 3:42 PM To: Li, Pan2 <pan2...@intel.com>; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gmail.com; rdapp....@gmail.com; Chen, Ken <ken.c...@intel.com>; Liu, Hongtao <hongtao....@intel.com>; Robin Dapp <rdapp....@gmail.com> Subject: Re: [PATCH v1 0/3] Refine the avg_ceil with fixed point vaadd > Similar to the avg_floor, the avg_ceil has the rounding mode > towards +inf, while the vaadd.vv has the rnu which totally match > the sematics. From RVV spec, the fixed vaadd.vv with rnu, The CI shows some scan failures in vls/avg-[456].c and widen/vec-avg-rv32gcv.c. Also, the lint check complains about this line: riscv_vector::emit_vlmax_insn (icode, riscv_vector::BINARY_OP_VXRM_RNU, operands); being to long. OK with those two fixed, thanks. For the record. When I first introduced these patterns I wasn't really aware of VXRM's properties, i.e. that we can just set it before a loop without restoring it. Therefore I implemented it using regular vector ops. Juzhe's patch used vaaddu for the unsigned variants but left the signed ones as is. I believe that was due to concerns about the general averaging idiom for signed integers (where we need to round towards zero), but not the special avg_ceil and avg_floor touched here. The latter ones are a good match for vaadd, the general case is not. -- Regards Robin