Re: [PATCH v1] RISC-V: Add ashiftrt operand 2 for vector avg_floor and avg_ceil

2025-07-19 Thread Jeff Law
On 7/19/25 3:37 AM, pan2...@intel.com wrote: From: Pan Li According to the semantics of the avg_floor and avg_ceil as below: floor: op0 = (narrow) (((wide) op1 + (wide) op2) >> 1); ceil: op0 = (narrow) (((wide) op1 + (wide) op2 + 1) >> 1); Aka we have (const_int 1) as the op2 of the ashif

[PATCH v1] RISC-V: Add ashiftrt operand 2 for vector avg_floor and avg_ceil

2025-07-19 Thread pan2 . li
From: Pan Li According to the semantics of the avg_floor and avg_ceil as below: floor: op0 = (narrow) (((wide) op1 + (wide) op2) >> 1); ceil: op0 = (narrow) (((wide) op1 + (wide) op2 + 1) >> 1); Aka we have (const_int 1) as the op2 of the ashiftrt but seems missed. Thus, add it back to align t