Tuesday, May 27, 2025 2:27 PM
To: Li, Pan2 ; gcc-patches@gcc.gnu.org
Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gmail.com;
rdapp@gmail.com; Chen, Ken ; Liu, Hongtao
; and...@sifive.com; Robin Dapp
Subject: Re: [PATCH v1 1/3] RISC-V: Leverage vaadd.vv for signed
On 5/27/25 12:27 AM, Robin Dapp wrote:
Apart from that it LGTM, thanks for digging deeper here.
Just wanted to echo this. I've had a low priority todo to review vaaddu
and friends after seeing them get used in some hand coded versions of
various routines in x264. Even if you're not tackl
-(define_expand "avg3_floor"
- [(set (match_operand: 0 "register_operand")
- (truncate:
-(ashiftrt:VWEXTI
- (plus:VWEXTI
- (sign_extend:VWEXTI
- (match_operand: 1 "register_operand"))
- (sign_extend:VWEXTI
- (match_operand: 2 "register_operand"))]
+(define_expan
From: Pan Li
The signed avg_floor totally match the sematics of fixed point
rvv insn vaadd, within round down. Thus, leverage it directly
to implement the avf_floor.
The spec of RVV is somehow not that clear about the difference
between the float point and fixed point for the rounding that
disc