On 7/19/25 3:37 AM, pan2...@intel.com wrote:
From: Pan Li <pan2...@intel.com>

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 the definition.

The below test suites are passed for this patch.
* The rv64gcv fully regression test.

gcc/ChangeLog:

        * config/riscv/autovec.md: Add (const_int 1) as the op2 of
        ashiftrt.
OK.

I wonder if this would have been caught by RTL checking. In an ideal world we'd spin RTL checking up once in a while in a native build/test cycle, but the current systems are just too slow ;(

Jeff

Reply via email to